#2840: 請問錯在哪@"@?


ps78316 (Simon)


import java.util.Scanner;
public class test1125a{
 public static void main(String[] args){
  Scanner a = new Scanner(System.in);
  System.out.println("輸入日期");
 
  while (a.hasNext()){
  int m=a.nextInt();
  int d=a.nextInt();
  int s = (m*2+d)%3;
  if (s==2){
   System.out.println("大吉");
  }else if(s==1){
   System.out.println("吉");
  }else {System.out.println("普通");
  }
  }
 }
}

#2844: Re:請問錯在哪@


example (學姊)


 s 是有分範圍的喔