明天几号
public class Date2 {
int year, month, day;
public void setdate(int y, int m, int d) {
year = y;month = m;day = d;
}
void today() {
System.out.println(The date of today is + year + / + month + /+ day);
}
boolean isleap(int y) {
return (y % 4 == 0 y % 100 != 0) || year % 400 == 0;
}
void tomorrow() {
int d, m, y;
d = day + 1;m = month;y = year;
if ((d 28) month == 2) {
if (!isleap(year) || d 29) {d = 1;m = m + 1;}
}
else if (d 30 (month 7 month % 2 == 0 || month 7 month % 2 == 1)) {d = 1;m = m + 1; }
else if (d 31) {d = 1;m = m + 1; }
if (m == 13
您可能关注的文档
最近下载
- Unit 4 The Wonders of Nature(第4课时) Section B 1a-2c 课件2026人教版英语八年级下册.ppt
- 六年级上册语文试题-字音专项练习(一)-人教部编版(含答案及解析).pdf VIP
- 人教版八年级下册英语Unit 4《The Wonders of Nature》(第3课时)教学课件(新教材).ppt
- Unit 4 The Wonders of Nature 第一课时 课件 人教版英语八年级下册.pptx VIP
- aecq200培训内容文档.pdf VIP
- 2025四川成都东部新区招聘编外工作人员29人参考笔试题库及答案解析.docx VIP
- 2025四川成都东部新区招聘编外工作人员29人备考笔试试题及答案解析.docx VIP
- 钢筋工培训计划大纲精编.doc VIP
- Unit 4 The Wonders of Nature 第7课时(Project & Reading Plus)课件人教版英语八年级下册.pptx VIP
- 人教版八年级英语下册Unit 4 The Wonders of Nature课件.ppt VIP
原创力文档

文档评论(0)