@rekedtechie :
Hey, I would totally agree with you, but dear it is required to stop if either condition fails so it has to be and operator.. I hope I have made myself clear to you.. :)
User Profile
Collapse
-
Hey, whatever sir said is absolutely fine, but if you didnt get it from that, here is a code block :
totalCalories += caloriesForItem ;
for (count = 1; caloriesForItem != 0 && count != numberOfItems; count++)
{
cout<<"Enter the calories: ";
cin >> caloriesForItem ;
cout << "Total calories eaten today = " << totalCalories << endl;
}...Leave a comment:
No activity results to display
Show More
Leave a comment: