getsmall.c (339B)
1 /* Esercizio 4.11 */ 2 3 #include <stdio.h> 4 5 int main() 6 { 7 int i, small; 8 int c_val; 9 10 printf("Intero: "); 11 scanf("%d", &c_val); 12 13 for (i = c_val; i >= 1; --i) { 14 printf("Intero: "); 15 scanf("%d", &c_val); 16 17 if (small > c_val) 18 small = c_val; 19 } 20 21 printf("Smallest: %d\n", small); 22 23 return 0; 24 } /* E0F main */ 25