Here is the code that help you to make the table.
- import java.util.Scanner;
- class Table
- {
- public static void main(String args[])
- {
- int n, i;
- System.out.print("Enter the table number: ");
- Scanner in = new Scanner(System.in);
- n = in.nextInt();
- System.out.println("Multiplication table of "+n+" is :-");
- for ( i = 1 ; i <= 10 ; i++ )
- System.out.println(n+"*"+i+" = "+(n*i));
- }
- }
Thank you, keep learning and sharing.