The following is my homework, which has been entangled for a long time. I wrote it based on the things I 've talked about over the past few days.
Import javax. Swing. joptionpane;
Public class tianshu {
/**
* @ Param ARGs
*/
Public static void main (string [] ARGs ){
// Todo auto-generated method stub
String year = joptionpane. showinputdialog (null, "Enter the year ");
String month = joptionpane. showinputdialog (null, "Enter the month ");
String day = joptionpane. showinputdialog (null, "Enter the number ");
Int A = integer. parseint (year );
Int B = integer. parseint (month );
Int c = integer. parseint (day );
Int C1 = 31;
Int C2 = 28;
Int C3 = 29;
Int C4 = 30;
If (B = 1 & (c <= 31 )){
Joptionpane. showmessagedialog (null, "day of year + A +" + C + ");
}
Else if (B = 2 & (a % 4 = 0) & (c <= 29 )){
Joptionpane. showmessagedialog (null, "the day of the year + A +" + (C + C1) + "day ");
}
Else if (B = 2 & (a % 4 = 0) & (c <= 28 )){
Joptionpane. showmessagedialog (null, "the day of the year + A +" + (C + C1) + "day ");
}
Else if (a % 4 = 0) & (B = 3) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3) + "day ");
}
Else if (a % 4! = 0) & (B = 3) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2) + "day ");
}
Else if (a % 4 = 0) & (B = 4) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1) + "day ");
}
Else if (a % 4! = 0) & (B = 4) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1) + "day ");
}
Else if (a % 4 = 0) & (B = 5) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4) + "day ");
}
Else if (a % 4! = 0) & (B = 5) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4) + "day ");
}
Else if (a % 4 = 0) & (B = 6) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4 + C1) + "day ");
}
Else if (a % 4! = 0) & (B = 6) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4 + C1) + "day ");
} Else if (a % 4 = 0) & (B = 7) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4 + C1 + C4) + "day ");
}
Else if (a % 4! = 0) & (B = 7) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4 + C1 + C4) + "day ");
} Else if (a % 4 = 0) & (B = 8) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4 + C1 + C4 + C1) + "day ");
}
Else if (a % 4! = 0) & (B = 8) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4 + C1 + C4 + C1) + "day ");
}
Else if (a % 4 = 0) & (B = 9) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4 + C1 + C4 + C1 + C1 + C1) + "day ");
}
Else if (a % 4! = 0) & (B = 9) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4 + C1 + C4 + C1 + C1 + C1) + "day ");
} Else if (a % 4 = 0) & (B = 10 & (c <= 31 ))){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4 + C1 + C4 + C1 + C1 + C4) + "day ");
}
Else if (a % 4! = 0) & (B = 10) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4 + C1 + C4 + C1 + C1 + C4) + "day ");
}
Else if (a % 4 = 0) & (B = 11) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4 + C1 + C4 + C1 + C1 + C4 + C1 + C1 + C1) + "day ");
}
Else if (a % 4! = 0) & (B = 11) & (c <= 30 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4 + C1 + C4 + C1 + C1 + C4 + C1 + C1 + C1) + "day ");
}
Else if (a % 4 = 0) & (B = 12) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C3 + C1 + C4 + C1 + C4 + C1 + C1 + C4 + C1 + C1 + C4) + "day ");
}
Else if (a % 4! = 0) & (B = 12) & (c <= 31 )){
Joptionpane. showmessagedialog (null, "is the" + A + "year" + (C + C1 + C2 + C1 + C4 + C1 + C4 + C1 + C1 + C4 + C1 + C4 + C4) + "day ");
}
Else {
Joptionpane. showmessagedialog (null, "input error ");
}
}
}