204 公倍數計算

import java.util.*;
class JPA204 {
    static Scanner input = new Scanner(System.in);
    public static void main(String[] args) {
        test();
        test();
    }

    public static void test() {
        System.out.println("Input:");
int x=input.nextInt();
        if(x%5==0&&x%9==0){
        System.out.println("Yes");
        }
        else{
        System.out.println("No");
        }
    }
}

沒有留言:

張貼留言