Rohyoohyun / C

0 stars 0 forks source link

2566 최댓값 #45

Open Rohyoohyun opened 2 months ago

Rohyoohyun commented 2 months ago
#include <stdio.h>

int main(){
    int max=0, x, y;
    int arr[9][9] = {0};

    for(int i=0; i<9; i++){
        for(int j=0; j<9; j++){
            scanf("%d", &arr[i][j]);
            if(max <= arr[i][j]){
                max = arr[i][j];
                x = i;
                y = j;
            }
        }
    }

    printf("%d\n%d %d", max, x+1, y+1); // 최댓값 출력

    return 0;
}