백준 #4504번 배수 찾기

jhj·2024년 5월 27일

백준 JAVA

목록 보기
503/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		while(m != 0) {
			if(m % n == 0) {
				System.out.println(m + " is a multiple of " + n + ".");
			}else {
				System.out.println(m + " is NOT a multiple of " + n + ".");
			}
			m = sc.nextInt();
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글