4.10 jobs

Source: Internet
Author: User

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 ");

}
}

}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.