training

Code I wrote during training
git clone git://git.bitsmanent.org/training
Log | Files | Refs | README

showfloor.c (309B)


      1 /* Esercizio 5.10 */
      2 
      3 #include <stdio.h>
      4 #include <math.h>
      5 
      6 int main()
      7 {
      8    double num = 1;
      9 
     10    while(num * 100 / 100) {
     11       printf("%.2f is now %.0f\n", num, floor( num ));
     12 
     13       printf("Give me a number (0 to end): ");
     14       scanf("%lf", &num);
     15    } /* end while (num) */
     16 
     17    return 0;
     18 } /* E0F main */
     19