관리 메뉴

Kim's Programming

2068. 최대수 구하기 본문

SW ExpertAcademy/D1

2068. 최대수 구하기

Programmer. 2018. 11. 30. 22:25

2068. 최대수 구하기

문제출처: https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QQhbqA4QDFAUq&categoryId=AV5QQhbqA4QDFAUq&categoryType=CODE




풀이 방법



<코드>


#include <iostream>

int main()
{
    int n{0};
    std::cin>>n;
    
    for(int testCase =1;testCase <=n;testCase ++)
    {
        int max{0};
        for(int i=0;i<10;i++) 
        {
            int input{0};
            std::cin>>input;
            if(max<input)
                max = input;
        }
        std::cout<<"#"<<testCase<<' '<<max<<"\n";
    }
    
    return 0;
}

'SW ExpertAcademy > D1' 카테고리의 다른 글

2071. 평균값 구하기  (0) 2018.11.30
2070. 큰 놈, 작은 놈, 같은 놈  (0) 2018.11.30
2063. 중간값 찾기  (0) 2018.11.30
2058. 자릿수 더하기  (0) 2018.11.30
2056. 연월일 달력  (0) 2018.11.30