Created
May 18, 2019 09:05
-
-
Save rkdgusrn1212/bdd2e1833a0bd4bf3076b742ee39d6d1 to your computer and use it in GitHub Desktop.
구구단 시작단과 끝단 입력받아서 짝수번 단만 출력하는 문제 입니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#입력 : int 자료형 2개, 시작 단을 int 자료형으로 입력받은 다음 마지막 단을 입력 받는다. | |
#출력 : 시작단부터 마지막단까지 짝수단만 2 * 1 = 2 형태로 한줄 씩 출력. | |
start_n = int(input())# 시작 단 입력 | |
end_n = int(input())# 마지막 단 입력 | |
for i in range(start_n, end_n+1): #start_n부터 end_n까지 반복 | |
if i % 2 == 0 : #i가 짝수일 때 | |
for j in range(1, 10):#1부터 9까지 반복 | |
print("%d * %d = %d"%(i, j, i*j)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment