home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Beginning C++ Through Gam…rogramming (2nd Edition)
/
BCGP2E.ISO
/
source
/
chapter02
/
play_again2.cpp
< prev
next >
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
|
315 bÂ
|
21 lines
// Play Again 2.0
// Demonstrates do loops
#include <iostream>
using namespace std;
int main()
{
char again;
do
{
cout << "\n**Played an exciting game**";
cout << "\nDo you want to play again? (y/n): ";
cin >> again;
} while (again == 'y');
cout << "\nOkay, bye.";
return 0;
}