Java program to Display Multiplication Table

Share on FacebookTweet about this on TwitterDigg thisPin on PinterestShare on LinkedInShare on StumbleUponShare on TumblrShare on Google+Email this to someone
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");
		}
	}
}

Share on FacebookTweet about this on TwitterDigg thisPin on PinterestShare on LinkedInShare on StumbleUponShare on TumblrShare on Google+Email this to someone

9 Responses to “Java program to Display Multiplication Table”

  1. Lakshminarayanan

    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);
    }
    }
    }

    Reply
  2. Jaswinder-Singh

    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);
    }
    }
    }

    Reply

Leave a Reply