training

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

largest.c (424B)


      1 /* Esercizio 3.24 (Cap. 3)
      2  *
      3  * Trovo il pių grande tra una serie di numeri
      4 */
      5 
      6 #include <stdio.h>
      7 
      8 int main()
      9 {
     10    int counter = 1, largest = 0, number;
     11 
     12    while(counter <= 10) {
     13       printf("Inserisci un numero [%d di 10]: ", counter);
     14       scanf("%d", &number);
     15 
     16       if (number > largest)
     17 	 largest = number;
     18 
     19       ++counter;
     20    }
     21 
     22    printf("Il numero pių grande č %d\n", largest);
     23 
     24    return 0;
     25 } /* E0F main */