Multiplication table
1. Question
1) Enter a number N
2) To print out from N*1 to N*9
2. Solution
12345678910111213141516import
java.util.Scanner;
public
class
MultiplicationTable {
public
static
void
main(String[]args){
Scanner a =
new
Scanner(System.in);
int
b = a.nextInt();
int
c;
for
(
int
i =
1
; i<
10
; i++){
c = b * i;
System.out.println(b+
" * "
+i+
" = "
+ c);
}
}
}
'Algorithm&DataStructures > StepByStep' 카테고리의 다른 글
[Algorithm] 백준알고리즘_MakingStar(2) (0) | 2016.08.24 |
---|---|
[Algorithm] 백준알고리즘_MakingStar(1) (0) | 2016.08.24 |
[Algorithm] 백준알고리즘_CountBackwardsN (0) | 2016.08.23 |
[Algorithm] 백준알고리즘_N (0) | 2016.08.23 |
[Algorithm] 백준알고리즘_REST(%) (0) | 2016.08.23 |