// aggiungiamo printf in maniera
// che illustri ciò che sta facendo
#include <stdio.h>
int a[10] = { 83, 35, 7, 21, 5, 16, 4, 9 , 3 , 19 }; // non è un set
int main() {
int i;
int minimo;
// Passo iniziale: pongo minimo = al primo elem. array
// minimo = a[0];
// PER ogni altro elemento a[i] dell'array
// SE l'elemento a[i] è < di minimo ALLORA
// minimo = a[i];
minimo = a[0];
for( i=0; i<10; i++) {
if( a[i] < minimo ) {
minimo = a[i];
}
}
printf("il minimo è: %d", minimo );
}
To embed this project on your website, copy the following code and paste it into your website's HTML: