#15095: JAVA求幫忙解不過


lingming88 (unknown)

學校 : 道明
編號 : 83315
來源 : [125.229.60.74]
最後登入時間 :
2022-07-14 20:58:47
a003. 兩光法師占卜術 | From: [115.82.178.163] | 發表日期 : 2018-09-11 21:10

 

import java.util.Scanner;

public class Text {

public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    System.out.println("Please input Month Day");
        int M = s.nextInt();
        int D = s.nextInt();
        int S = (M * 2 + D) % 3;
    if (S == 0) {
       System.out.println("吉");
        } else if (S == 1) {
       System.out.println("大吉");
        } else if (S == 2) {
       System.out.println("普通");
        }
    }

}

 
#15096: Re:JAVA求幫忙解不過


lingming88 (unknown)

學校 : 道明
編號 : 83315
來源 : [125.229.60.74]
最後登入時間 :
2022-07-14 20:58:47
a003. 兩光法師占卜術 | From: [115.82.178.163] | 發表日期 : 2018-09-11 21:12

 

import java.util.Scanner;

 

public class Text {

 

    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);

        System.out.println("Please input Month Day");

        int M = s.nextInt();

        int D = s.nextInt();

        int S = (M * 2 + D) % 3;

        if (S == 0) {

            System.out.println("普通");

        } else if (S == 1) {

            System.out.println("吉");

        } else if (S == 2) {

            System.out.println("大吉");

        }

    }

 

}




 
ZeroJudge Forum