home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Liren Large Software Subsidy 7
/
07.iso
/
c
/
c021
/
7.img
/
EXAMPLES.ZIP
/
INTRO18.C
< 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
|
1990-05-04
|
277 b
|
14 lines
/* INTRO18.C--Example from Chapter 4 of Getting Started */
#include <stdio.h>
int main()
{
int number, total;
for (number = 1, total = 0; number < 11; total += number,
number++);
printf("Total of numbers from 1 to 10 is %d\n", total);
return 0;
}