Guest User

Untitled

a guest
Dec 23rd, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main (void)
  4.  
  5. {
  6.  
  7. int contatore;
  8. int numero;
  9. int minimo,massimo;
  10.  
  11. printf("quanti numeri vuoi inserire?");
  12. scanf("%d", &contatore);
  13.  
  14. if( contatore <= 0 ){
  15.     printf("non hai inserito nessun numero");
  16.         }
  17.  
  18. else{
  19.     for(numero=1; numero<=contatore ; numero++){
  20.       printf("inserisci iL numero da confrontare");  
  21.         scanf("%d", &numero);
  22.     numero=minimo;
  23.     massimo=1;
  24.         if(minimo <= massimo){
  25.         minimo=minimo;
  26.         }
  27.         else{
  28.         massimo=minimo;
  29.         }
  30.        
  31.             numero=numero+1;
  32.         }
  33.                
  34.     }
  35.  
  36. printf(" il numero minimo e' %d ", minimo );
  37.  
  38. return 0;
  39.  
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment