試了好多天,還是不知道錯在哪裡??傷腦筋......
import java.util.Scanner;
public class text{
public static void main(String[] args) {
Scanner cin= new Scanner(System.in);
int s=0;
String n="";
String a="閏年";
String b="平年";
s=cin.nextInt();
if(s % 4 ==0 && s % 100 !=0)
{
n=a;
}
else if(s % 400 ==0){
n=a;
}
else{
n=b;
}
System.out.print(n);
}
}