본문 바로가기

DATA 분석 교육 과정 (2024.02~08)/JAVA_FESTIVAL

[x단 * 어느 수까지 출력]

728x90

Scanner sc = new Scanner(System.in);
   System.out.println("단수입력:");
   int input1 = sc. nextInt();
   System.out.println("어느 수 까지 출력:");
   int input2 = sc. nextInt();
   
  System.out.println("2단");
  
  int sum =0;
  for(int i=1; i<=input2;i++ ) {
	  System.err.println(input1+"*"+i+"="+(input1*i));
  }
728x90
반응형

'DATA 분석 교육 과정 (2024.02~08) > JAVA_FESTIVAL' 카테고리의 다른 글

[팩토리얼]  (0) 2024.03.14
[정수 n받고 > n번째 항]  (0) 2024.03.14
[별찍기2]  (0) 2024.03.13
[별찍기1]  (0) 2024.03.13
[1,+-2,+3-4+5-6+7....100 합 구하기]  (0) 2024.03.13