home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
TC-300
/
EXAMPLES
/
INTRO23.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-17
|
504b
|
31 lines
// INTRO23.CPP--Example from Chapter 3, "An Introduction to C++"
#include <iostream.h>
int warning = -1;
int get_status(void)
{
return warning;
}
int main()
{
int count = 10;
while (count-- > 1)
{
if (get_status() == warning)
break;
cout << '\n' << count;
}
if (count == 0)
cout << "Shuttle launched\n";
else
{
cout << "\nWarning received\n";
cout << "Count down held at t - " << count;
}
return 0;
}