Programming/Python & Data Structures
[Baekjoon/Python3/C] 2741번 N 찍기
HooNeee
2020. 12. 4. 01:58
[Baekjoon/Python3/C] 2741번 N 찍기
2741번: N 찍기
자연수 N이 주어졌을 때, 1부터 N까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오.
www.acmicpc.net
[Python3]
N = int(input())
for i in range(1, N + 1):
print(i)
[C]
#include <stdio.h>
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
printf("%d\n", i);
}