home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beginning C++ Through Gam…rogramming (2nd Edition)
/
BCGP2E.ISO
/
source
/
chapter02
/
score_rater2.cpp
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
2003-10-21
|
336 bÂ
|
21 lines
// Score Rater 2.0
// Demonstrates an else clause
#include <iostream>
using namespace std;
int main()
{
int score;
cout << "Enter your score: ";
cin >> score;
if (score > 500)
cout << "\nYou got over 500. Nice score.\n";
else
cout << "\nYou got 500 or less. Nothing to brag about.\n";
return 0;
}