728x90
#include <stdio.h>
int main(void) {
int s[9] = {};
int max;
int w;
for (int i = 0; i < 9; i ++) {
scanf("%d",&s[i]); }
max = s[0];
for (int i = 0; i < 9; i ++) {
if(max < s[i]) max = s[i]; }
for (int i = 0; i < 9; i ++) {
if(max == s[i]) w = i; }
printf("%d\n", max);
printf("%d", w+1);
return 0;
}
728x90
'호그와트' 카테고리의 다른 글
얼마나 많은 단어가 나왔는지 알고싶나요? (0) | 2022.08.10 |
---|---|
나는 지혜로운 영웅이다 (0) | 2022.07.26 |
백준 최소공배수 구하기 (0) | 2022.07.15 |
백준 화성에서 온 수학자 (0) | 2022.07.15 |
백준 10818번 파이썬 (0) | 2022.07.13 |