증가시키며 출력하기 2
i = 10
while i <= 26:
print(i, end=" ")
i += 1
n까지 자연수 출력
https://www.codetree.ai/missions/4/problems/print-1-to-n?&utm_source=clipboard&utm_medium=text
n = int(input())
i = 1
while i <= n:
print(i, end=" ")
i += 1
별 n개 출력하기
https://www.codetree.ai/missions/4/problems/print-n-stars?&utm_source=clipboard&utm_medium=text
n = int(input())
i = 1
while i <= n:
print("*")
i += 1
'코딩테스트 > 프로그래밍 기초 | 단순 반복문' 카테고리의 다른 글
[코드트리] while문 b → a 1씩 감소 (0) | 2024.12.27 |
---|---|
while문 a → b 2씩 증가 (0) | 2024.12.27 |
[코드트리] for문 b → a 1씩 감소 (0) | 2024.12.27 |
[코드트리] for문 a → b 2씩 증가 (1) | 2024.12.26 |
[코드트리] for문 a → b 1씩 증가 (0) | 2024.12.26 |