Notice
Recent Posts
Recent Comments
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Archives
Today
Total
관리 메뉴

hwooo

(C) 2742번: 기찍 N 본문

Study/Algorithm

(C) 2742번: 기찍 N

hwooo 2022. 6. 5. 03:18

https://www.acmicpc.net/problem/2742

 

2742번: 기찍 N

자연수 N이 주어졌을 때, N부터 1까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오.

www.acmicpc.net


코드

#include <stdio.h>
int main() {
	int n, i;
	scanf("%d", &n);

	for (i = n; i > 0; i--) printf("%d\n", i);
}

'Study > Algorithm' 카테고리의 다른 글

(C) 11022번: A+B - 8  (0) 2022.06.05
(C) 11021번: A+B - 7  (0) 2022.06.05
(C) 2741번: N 찍기  (0) 2022.06.05
(C) 15552번: 빠른 A+B  (0) 2022.06.05
(C) 8393번: 합  (0) 2022.06.05