home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / tasm / chapxmpl.arc / TDURCH.C < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-09  |  420 b   |  18 lines

  1. extern float Durchschnitt(int far * WertZgr, int AnzahlWerte);
  2. #define ANZAHL_AN_TEST_WERTEN 10
  3. int TestWerte[ANZAHL_AN_TEST_WERTEN] = 
  4.    {
  5.    1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  6.    };
  7.  
  8. main()
  9.    {
  10.    printf("Der Durchschnitt lautet: %f\n",
  11.           Durchschnitt(TestWerte, ANZAHL_AN_TEST_WERTEN));
  12.    }
  13.  
  14. float IntDivide(int Dividend, int Divisor)
  15.    {
  16.    return( (float) Dividend / (float) Divisor );
  17.    }
  18.