# include # include using namespace std; int main ( ) // // LUNCH.CPP demonstrates how a counter variable (in this case "DAY") // can be used to control how many times a WHILE loop is executed. // { int day; float lunch; float total; day = 0; total = 0.0; while ( day < 7 ) { // // Increase the loop counter. // day = day + 1; cout << "Enter amount for lunch on day " << day << ": "; cin >> lunch; total = total + lunch; } cout << "\n"; cout << "This week's lunch bill: " << total << ".\n"; return 0; }