Python Compiler
table = int(input("Enter the table number: ")) length = int(input("Enter the table length: ")) print("\nMultiplication table: %d" % table) for i in range(1, length+1): print("%2d * %d = %d" %(i, table, i*table))
OUTPUT
Enter the table number: 5
Enter the length: 6

Multiplication table: 5
1 * 5 = 5
2 * 5 = 10
3 * 5 = 15
4 * 5 = 20
5 * 5 = 25
6 * 5 = 30
×

Save as Private