import java.util.Scanner;
public class MultiplicationOfTable{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
System.out.println("Enter a number whose table you want: ");
int n = in.nextInt();
System.out.println("Table of "+n+" is: ");
for(int i=1; i<=10; i++){
System.out.println(n*i);
}
}
}
output
Enter a number whose table you want:
8
Table of 8 is:
8
16
24
32
40
48
56
64
72
80
public class MultiplicationOfTable{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
System.out.println("Enter a number whose table you want: ");
int n = in.nextInt();
System.out.println("Table of "+n+" is: ");
for(int i=1; i<=10; i++){
System.out.println(n*i);
}
}
}
output
Enter a number whose table you want:
8
Table of 8 is:
8
16
24
32
40
48
56
64
72
80
No comments:
Post a Comment