C语言语法练习
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int main(int argc, char** argv) {
int x, max_idx = -1, max_val = INT_MIN;
for (int i = 1; i <= 100; ++i) {
scanf("%d", &x);
if (x > max_val) {
max_idx = i;
max_val = x;
}
}
return printf("%d\n%d\n", max_val, max_idx), 0;
}