training

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

pairs.c (316B)


      1 /* Esercizio 2.24 (Cap. 2)
      2    Dato un intero calcola se e' pari o dispari. */
      3 
      4 #include <stdio.h>
      5 
      6 int main()
      7 {
      8    int n;
      9 
     10    printf("Inserisci un intero: ");
     11    scanf("%d", &n);
     12 
     13    if (n%2 == 0)
     14       printf("%d e' pari\n", n);
     15 
     16    if (n%2 != 0)
     17       printf("%d e' dispari\n", n);
     18 
     19    return 0;
     20 } /* E0F main */
     21