차례로 출력
https://www.codetree.ai/missions/4/problems/print-in-order?&utm_source=clipboard&utm_medium=text
for i in range(5,18):
print(i, end=" ")
입력받는 수부터 100까지 출력
n = int(input())
for i in range(n, 101):
print(i, end=" ")
출력결과 1
https://www.codetree.ai/missions/4/problems/reading-k201517?&utm_source=clipboard&utm_medium=text
8
출력결과 8
https://www.codetree.ai/missions/4/problems/reading-k201528?&utm_source=clipboard&utm_medium=text
12
출력결과 10
https://www.codetree.ai/missions/4/problems/reading-k201530?&utm_source=clipboard&utm_medium=text
코드트리 | 코딩테스트 준비를 위한 알고리즘 정석
국가대표가 만든 코딩 공부의 가이드북 코딩 왕초보부터 꿈의 직장 코테 합격까지, 국가대표가 엄선한 커리큘럼으로 준비해보세요.
www.codetree.ai
127
1부터 n까지 출력
https://www.codetree.ai/missions/4/problems/print-from-1-to-n?&utm_source=clipboard&utm_medium=text
i = int(input())
for i in range(1, i+1):
print(i, end=" ")
'코딩테스트 > 프로그래밍 기초 | 단순 반복문' 카테고리의 다른 글
[코드트리] while문 b → a 1씩 감소 (0) | 2024.12.27 |
---|---|
while문 a → b 2씩 증가 (0) | 2024.12.27 |
[코드트리] while문 a → b 1씩 증가 (0) | 2024.12.27 |
[코드트리] for문 b → a 1씩 감소 (0) | 2024.12.27 |
[코드트리] for문 a → b 2씩 증가 (1) | 2024.12.26 |