[user02@FC4 Lesson08]$ cat -n if_else.cpp
1 #include <iostream>
2 using namespace std;
3
4 int main()
5 {
6 int test_score = 95;
7
8 if (test_score >= 90)
9 cout << "Congratulations, you got an A!" << endl;
10 else
11 cout << "You must work harder next time!" << endl;
12
13 return 0;
14 }
[user02@FC4 Lesson08]$ g++ -o if_else if_else.cpp[user02@FC4 Lesson08]$ ./if_else
Congratulations, you got an A!
lesson_8_if_else.cpp, Rev. 1, Last changed on 2005-08-10 03:26, 307 page hits