2017년 4월 29일 토요일

python - multiplication table

python - multiplication table

# Multiplication table - Multiplication table output according to user input 
def gugu(dan) :
    # print("입력하신 %d 단의 구구단 입니다." % dan) 
    print("Output Multiplication table : %d" % dan)
    for x in range(110) :
        gugu = dan * x
        print("%d * %d = %d" %(danxgugu))
# dan = int(input("출력하고자 하는 구구단의 단수를 숫자로 입력해 주세요. : ")) 
dan = int(input("Enter the number of input multiplication tables you want to output. : "))
gugu(dan)
#python3 #multiplication_table

댓글 없음:

댓글 쓰기