백준 C, C++ 문제(소스코드만)
2562번, 최댓값
swchung09
2025. 4. 7. 22:59
#include <stdio.h>
int main(){
int temp, max = -1, max_i;
for (int i = 1; i <= 9; i++){
scanf("%d", &temp);
if (max < temp){
max = temp;
max_i = i;
}
}
printf("%d\n%d", max, max_i);
}