Write a program to take input from user in a integer and print a table of that value , like Enter Value : 3 3 X 1 = 3 3 X 2 = 6 . 3 X 10 = 30

class Table
{
public static void main(String args[])
{
int a=Integer.parseInt(System.console().readLine("enter the value of a"));
int i,count;
for(i=1;i<=10;i++)
{
count=a*i;
System.out.println(" "+count);
}
}
}

No comments:

Post a Comment