Simple java Input, get number form user and provide table of that number
// Simple java Input
// get number form user and provide table of that number.
package ahsan;
import java.util.Scanner;
public class Ahsan {
public static void main(String []arg){
Scanner obj= new Scanner(System.in);
int a,b;
int ch;
do{System.out.print("Enter Your Number want to
see Table of that number\n");
ch=obj.nextInt();
System.out.println("Table of "+ch+" is :");
for(int i=1; i<11; i++)
{
System.out.println(i+"\t"+ch+"\t"+(i*ch));
}}while(ch!=0);
}
}
Output of this program.
// get number form user and provide table of that number.
package ahsan;
import java.util.Scanner;
public class Ahsan {
public static void main(String []arg){
Scanner obj= new Scanner(System.in);
int a,b;
int ch;
do{System.out.print("Enter Your Number want to
ch=obj.nextInt();
System.out.println("Table of "+ch+" is :");
for(int i=1; i<11; i++)
{
System.out.println(i+"\t"+ch+"\t"+(i*ch));
}}while(ch!=0);
}
}
Output of this program.