#include <stdio.h>int main(void){ int score[10] = {50, 100, 80, 90, 10, 70, 20, 60, 40, 20}; int tmp; tmp = score[0]; for (int i = 1; i <= 10; i++) { if (score[i] > tmp) { tmp = score[i]; } } printf("MAX is %d\n", tmp); return 0;}
#include <stdio.h>
int main(void){ int score[10] = {50, 100, 80, 90, 10, 70, 20, 60, 40, 20}; int tmp;
tmp = score[0]; for (int i = 1; i <= 10; i++) { if (score[i] > tmp) { tmp = score[i]; } }
printf("MAX is %d\n", tmp);
return 0;}