Skip to content

Commit 5f5d022

Browse files
Create multiplicationTable.java
1 parent 66f16a8 commit 5f5d022

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

multiplicationTable.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import java.util.Scanner;
2+
3+
public class multiplicationTable {
4+
public static void main(String[] args) {
5+
Scanner sc = new Scanner(System.in);
6+
7+
//System.out.print("Enter a number to print its multiplication table: ");
8+
//int number = sc.nextInt();
9+
10+
//System.out.println("Multiplication Table for " + number + ":");
11+
for (int i = 1; i <= 10; i++) {
12+
for (int j=1 ; j<=10 ; j++){
13+
//System.out.print(j);
14+
System.out.print(j+ " × " + i + " = " + (j * i)+ " ");
15+
}
16+
//if(i==4) continue;
17+
System.out.println();
18+
}
19+
20+
sc.close();
21+
}
22+
}

0 commit comments

Comments
 (0)