Hi, this is my first language and I am taking a class in C++. I know I'm stuck in something simple, but I need help. I can't figure out. My code is not finish yet, but I'm working on it.
Problem: If a ticket cost less than $5 go to movies, otherwise stay home and study. You need to use 10x loop and add 3 accumulators: a)how many went to movies? b) how many stay at home & study? c) total cost of movie tickets?
I'm trying to do a) and b) so far but an error show up when I try to compile. Can you please help me?
movie_count = home_count = 0;
for (int i=0; i<10; i++)
cout<<"Enter the ticket value: ";
if (ticket < 5)
cout<<"Go to the movies";
cout<<"Stay home and study";
cout<<"\n Go to the movies count is " << movie_count<< "\n";
cout<<"\n Stay home count is " << home_count<< "\n";