증가시키며 출력하기
https://www.codetree.ai/missions/4/problems/increase-and-print?&utm_source=clipboard&utm_medium=text
for i in range(5, 18, 2):
print(i, end=" ")
정수 입력받아 배수 출력
n = int(input())
for n in range(n, n*6, n):
print(n, end=" ")
홀수만 출력
https://www.codetree.ai/missions/4/problems/output-only-odd?&utm_source=clipboard&utm_medium=text
i = input().split()
a,b = int(i[0]), int(i[1])
for i in range(a, b+1, 2):
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 1씩 증가 (0) | 2024.12.26 |