[user02@FC4 Lesson09]$ cat -n askcount.cpp
1 #include <iostream>
2 using namespace std;
3
4 int main()
5 {
6 int count;
7 int ending_value;
8
9 cout << "Type in the ending value and press Enter: ";
10 cin >> ending_value;
11
12 for (count = 0; count <= ending_value; count++)
13 cout << count << ' ';
14 cout << endl;
15
16 return 0;
17 }
[user02@FC4 Lesson09]$ g++ -o askcount askcount.cpp[user02@FC4 Lesson09]$ ./askcount
Type in the ending value and press Enter: 20
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
lesson_9_askcount.cpp, Rev. 1, Last changed on 2005-08-10 03:44, 317 page hits