Write a program that prompts the user to input a number and prints its mulitiplication table.

Source Code

num = int(input("Enter a number: "))

print("Multiplication table of", num)
for i in range(1, 11):
    product = num * i
    print(num, "x", i, "=", product)

Output

Enter a number: 4
Multiplication table of 4
4 x 1 = 4
4 x 2 = 8
4 x 3 = 12
4 x 4 = 16
4 x 5 = 20
4 x 6 = 24
4 x 7 = 28
4 x 8 = 32
4 x 9 = 36
4 x 10 = 40