Java program to Display Multiplication Table

1
2
3
4
5
6
7
8
9
10
11
12
class MultiplicationTable{
	public static void main(String args[]){
		int num = Integer.parseInt(args[0]);
		System.out.println("*****MULTIPLICATION TABLE*****");
		for(int i=1;i<=num;i++){
			for(int j=1;j<=num;j++){
				System.out.print(" "+i*j+" ");
			}
			System.out.print("\n");
		}
	}
}
surajk

9 thoughts on “Java program to Display Multiplication Table

  1. Here the correct code……

    import java.util.Scanner;

    public class multip{

    public static void main(String arg[])
    {
    int i,k;
    Scanner in=new Scanner(System.in);
    System.out.println(“Enter the multiplication table number “);
    i=in.nextInt();
    for(int j=1; j<=10; j++)
    {
    k=i*j;
    System.out.println(i+" * "+j+" = "+k);
    }
    }
    }

  2. import java.io.*;
    class jh
    {
    public static void main(String args[])throws IOException
    {
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    int a,b,c=1;
    System.out.println(“Enter The No=”);
    a=Integer.parseInt(br.readLine());
    for(c=1;c<=10;c++)
    {
    b=a*c;
    System.out.println(b);
    }
    }
    }

Leave a Reply

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

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in