Make an algorithm program that prompts the user for a number and then displays its multiplication table using a loop.
n = int(input('Enter the number: '))
if n == 0:
print('0 * 0 = 0')
else:
for i in range(1, n + 1):
print(f'{i} * {n} =', i * n)
Comments
Leave a comment