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

  1. /* INTRO7.C - Beispiel aus Kapitel 4 der
  2.               Einführung */
  3.  
  4. #include <stdio.h>
  5.  
  6. int main()
  7. {
  8.    float ergebnis;
  9.    ergebnis = 1.0 + 2.0 * 3.0 / 4.0;
  10.    printf("%f\n", ergebnis);
  11.    ergebnis = 1.0 / 2.0 + 3.0;
  12.    printf("%f\n", ergebnis);
  13.    ergebnis = (1.0 + 2.0) / 3.0;
  14.    printf("%f\n", ergebnis);
  15.    ergebnis = (1.0 + 2.0 / 3.0) + 4.0;
  16.    printf("%f\n", ergebnis);
  17.  
  18.    return 0;
  19. }
  20.