Wednesday, 10 July 2013

program for printing table of a given number using java

import java.io.*;
public class Table
{
        public static void main(String ap[]) throws IOException
 {
                InputStreamReader i=new InputStreamReader(System.in);
                BufferedReader br=new BufferedReader(i);
                int a;
                System.out.println("enter number");
                a=Integer.parseInt(br.readLine());
                System.out.println("table of " +a);
                for(int j=1;j<=10;j++)
                System.out.println(a*j);
        }
}

No comments:

Post a Comment