Skip to content

Commit c0c93ed

Browse files
committed
Generate Multiplication Table in Java
1 parent 0378876 commit c0c93ed

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

MultiplicationTable.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import java.util.*;
2+
class mt
3+
{
4+
public static void main(String[] args)
5+
{
6+
Scanner s=new Scanner(System.in);
7+
System.out.print("WHICH TABLE DO YOU WANT?");
8+
int num=s.nextInt();
9+
System.out.print("ENTER THE TABLE LIMIT:");
10+
int n=s.nextInt();
11+
for(int i=1; i<=n; ++i)
12+
{
13+
System.out.printf("%d * %d = %d \n", num, i, num * i);
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)