#include <stdio.h>
//exo 4.2
int main() {
int tab[10]={0}, i=0 ,max=0 , min=0;
for(i=0;i<10;i++){
tab[i] = i ;
printf("%d\n",tab[i]) ;
if (tab[i]>max){
max = tab[i] ;
}
else if (tab[i]<min){
min = tab[i] ;
}
}
printf("\n le minimum est : %d", min) ;
printf("\n le maximum est : %d", max) ;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: