1234567891011121314151617181920212223
#include "stdafx.h" #include <iostream> #include <string> using namespace std; int main () { int age; int hello; cout << "Now tell me how old are you?" << endl; cin >> age; cout << "Calculating..." ; hello = age * 6; while (hello>0) { --age; cout << age << endl; } cout << "done :)"; return 0; }
1234567
while (hello>0) { --hello; // update expression --age; cout << age << endl; }
hello=age;