Java program multiplication table - WalkyTechy.com

About this program

This program takes a number from user and prints the multiplication table.

Ex:
Enter a number: 7

7 * 1   = 7
7 * 2   = 14
7 * 3   = 21
7 * 4   = 28
7 * 5   = 35
7 * 6   = 42
7 * 7   = 49
7 * 8   = 56
7 * 9   = 63
7 * 10 = 70

LOGIC

Take a number from the user and multiply that number with 1 to 10 using for loop.

CODE EXPLANATION

(i) Taking an integer number from the user and assigning it to a variable n.

(ii) Using For loop multiply n * i.

(iii) Print the result in such a way that it looks like a multiplication table.

CODE

OUTPUT

Program to create simple multiplication table – Java
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *