home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Liren Large Software Subsidy 7
/
07.iso
/
c
/
c063
/
1.ddi
/
EXAMPLES.ZIP
/
INTRO21.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
C/C++ Source or Header
|
1992-02-18
|
278 b
|
14 lines
// INTRO21.CPP--Example from Chapter 3, "An Introduction to C++"
#include <iostream.h>
int main()
{
int number, total;
for (number = 1, total = 0; number < 11; total += number,
number++);
cout << "\nTotal of numbers from 1 to 10 is "<< total;
return 0;
}