끄적끄적 코딩
article thumbnail
Published 2019. 3. 5. 01:42
[C++] 백준 2742번 기찍 N 알고리즘

for문을 이용해서 풀었습니다.

 

#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    int n;
    cin >> n;
    for(int i=0; i<n; i++)
    {
        cout << n-i << "\n";
    }
    return 0;
}

'알고리즘' 카테고리의 다른 글

[C++] 백준 2438번 별 찍기 - 1  (0) 2019.03.05
[C++] 백준 2739번 구구단  (0) 2019.03.05
[C++] 백준 2741번 N 찍기  (0) 2019.03.05
[C++] 백준 2558번 A+B - 2  (0) 2019.03.05
[C++] 백준 10430번 나머지  (0) 2019.03.05

검색 태그