C++ while statement counter int value
#include <iostream> using namespace std; int main()//from ww w. jav a 2 s.co m { int count; count = 1; // initialize count while (count <= 10) { cout << count << " "; count++; // increment count } return 0; }