home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
OTHERUTI
/
TCPP30-3.ZIP
/
EXAMPLES.ZIP
/
INTRO22.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-18
|
285b
|
17 lines
// INTRO22.CPP--Example from Chapter 3, "An Introduction to C++"
#include <iostream.h>
int main()
{
int number = 1, total = 0;
while (number < 11)
{
total += number;
number++;
}
cout << "\nTotal of numbers from 1 to 10 is " << total;
return 0;
}