import java.util.Scanner;


public class Multiplication_While {


public static void main(String[] args) {

// TODO Auto-generated method stub



int a;

int b;

int c = 1;

Scanner firstNum = new Scanner(System.in);

Scanner secondNum = new Scanner(System.in);

System.out.println("구구단 출력입니다 (다음으로 넘어가시려면 Enter를 눌러주세요)");

String 구구단시작 = firstNum.nextLine();

System.out.println("구구단을 시작할 수를 입력해주세요. (예 : 3단 => 3)");

a = firstNum.nextInt();//시작하는 수

System.out.println("구구단이 끝나는 수를 입력해주세요. (예 : 11까지 => 11)");

b = secondNum.nextInt();//끝나는 수

System.out.println();

while(c<= b) {

System.out.println(a+" * "+c+" = "+a*c);

System.out.println();

c++;

}

}


}



블로그 이미지

irostub

iro의 잡화상점

,