MapleStory Cookie With Halo

๐Ÿ•ธ Algorithm/๐Ÿ•ธ ๋ฐฑ์ค€ BaekJoon

[๋ฐฑ์ค€][java][2739][๊ตฌ๊ตฌ๋‹จ]

๋‰ด์ด NUEY 2023. 10. 1. 16:23
๋ฐ˜์‘ํ˜•

import java.util.Scanner;

// 2739	๊ตฌ๊ตฌ๋‹จ
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int num = sc.nextInt();
		sc.close();
		
		for (int i = 1; i <= 9; i ++) {
			System.out.printf("%d * %d = %d\n", num, i, num*i);
		}
	}
}
  •  1์—์„œ 9๊นŒ์ง€๋งŒ for๋ฌธ์„ ํ™œ์šฉํ•˜์—ฌ ํ‘œ๊ธฐํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.
๋ฐ˜์‘ํ˜•