donaricano-btn

Multiplication table


1. Question

1) Enter a number N

2) To print out from N*1 to N*9


2. Solution

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import 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);
        }
    }
}

https://github.com/KyleJeong/Algorithm
블로그 이미지

리딩리드

,