https://www.acmicpc.net/problem/2562


이거 답은 정상적으로 나오는데 vs로 컴파일 돌리면 실행결과 나오고 a배열에 문제있다고 오류남



1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>
int main() {
int max = 0, a[9], b, count = 0;
for (int i = 1; i <= 9; i++) {
scanf("%d", &a[i]);
count += 1;
if (max < a[i]) {
max = a[i];
b = count;
}
}
printf("%d %d", max, b);
}
cs


머 이상한점이라도 있음??