home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tcpp / examples / intro19.c < prev    next >
C/C++ Source or Header  |  1990-06-09  |  315b  |  19 lines

  1. /* INTRO19.C - Beispiel aus Kapitel 4 der
  2.                Einführung */
  3.  
  4. #include <stdio.h>
  5.  
  6. int main()
  7. {
  8.    int zahl = 1, gesamt = 0;
  9.    while (zahl < 11)
  10.    {
  11.       gesamt += zahl;
  12.       zahl++;
  13.    }
  14.    printf("\nDie Summe der Zahlen von 1 bis 10 "
  15.           "ist %d\n", gesamt);
  16.  
  17.    return 0;
  18. }
  19.