write a program in java to find table of a number using while loop. use buffered reader
honey9999:
kritika
Answers
Answered by
1
import java.io.*;
class Table
{
public static void main (String args[])
{
BufferedReader buff = new BufferedReader (new InputStreamReader(System.in));
int n, i;
System.out.print("Enter the number: ");
n = Integer.parseInt(buff.readLine());
for (i = 1; i <= 10; i++) //table upto 10
{
System.out.println(n + " x " + i " = " + (n*i));
}
}
}
Hope it helps...
Thanks.
class Table
{
public static void main (String args[])
{
BufferedReader buff = new BufferedReader (new InputStreamReader(System.in));
int n, i;
System.out.print("Enter the number: ");
n = Integer.parseInt(buff.readLine());
for (i = 1; i <= 10; i++) //table upto 10
{
System.out.println(n + " x " + i " = " + (n*i));
}
}
}
Hope it helps...
Thanks.
Similar questions