Skip to content

Commit 7942991

Browse files
committed
Basic:- Solution to print Multiplication Table
1 parent 67872a7 commit 7942991

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package Scaler.Assignments;
2+
import java.util.*;
3+
4+
public class MultiplicationTable {
5+
public static void main(String[] args) {
6+
// YOUR CODE GOES HERE
7+
// Please take input and print output to standard input/output (stdin/stdout)
8+
// DO NOT USE ARGUMENTS FOR INPUTS
9+
// E.g. 'Scanner' for input & 'System.out' for output
10+
11+
Scanner scanner = new Scanner(System.in);
12+
int number = scanner.nextInt();
13+
14+
for(int i = 1; i <= 10; i++){
15+
int result = number * i;
16+
System.out.println(number + " * " + i + " = " + result);
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)