Situatie
This program displays the multiplication table of variable num
Solutie
Pasi de urmat
num = int(input(“Enter a number: “))
for i in range(1, 11):
print(num, ‘x’, i, ‘=’, num*i)
Output:
Enter a number: 11
11 x 1 = 11
11 x 2 = 22
11 x 3 = 33
11 x 4 = 44
11 x 5 = 55
11 x 6 = 66
11 x 7 = 77
11 x 8 = 88
11 x 9 = 99
11 x 10 = 110
Leave A Comment?