max.c
C
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
int main (void) {
int t[10];
int k;
int max;
for(int k = 0; k<10 ; ++k){
printf("please enter t[%d] : ",k);
assert(scanf("%d", &t[k])==1);
printf("t[%d] = %d\n", k,t[k]);
}
max = t[0];
for(int i = 1; i<10; ++i) {
if ( t[i]>max){
max = t[i];
}
}
printf("le maximum des element de t est : %d", max);
return 0;
}
Output
Embed on website
To embed this program on your website, copy the following code and paste it into your website's HTML:
Comments
This comment belongs to a banned user and is only visible to admins.
This comment belongs to a deleted user and is only visible to admins.