I have a question about an if statement.
For example:
cout <<"What is your favorite icecream?"<<endl;
cin >> icecream; // this would already be declared up above
if (icecream = strawberry)
{
cout <<"Really, how many servings do you eat per day?"<<endl;
cin >> servings; // this would be declared up above
if (servings = alot) // This is where I get confused, and I am pretty sure I am doing it wrong.
cout >> "Your fat">>endl;
if (servings = small)
cout >> "Good">>endl;
}
return 0;
}
So if they eat strawberry icecream, I want to know how much they eat per day and after that say something, such as "your fat" if it's a lot. Or maybe if it isn't a lot, and the serving = small then I want it to say something else. That way my program can respond to multiple things. But, I don't know how to add that in there. Because I would also add something for if they pick chocolate or another favor, saying other things..
Right now I don't know how to explain this, if you don't understand please tell me. I will try and come up with a better way of explaining things. I am not actually writting a program about icecream, but about something else. I can show you my code so far, but it isn't all that great. I am still new to C++