参考代码:
import java.time.LocalDate; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int []start = new int[3]; int []end = new int[3]; for(int i = 0; i < 3; i++) start[i] = scanner.nextInt(); for(int i = 0; i < 3; i++) end[i] = scanner.nextInt(); LocalDate a = LocalDate.of(start[0], start[1], start[2]); LocalDate b = LocalDate.of(end[0], end[1], end[2]); int res = 0; while(a.isBefore(b)) { a = a.plusDays(1); res++; } System.out.println(res); } }
0.0分
6 人评分
不容易系列2 (C语言代码)浏览:631 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:624 |
Cylinder (C语言描述+详细分析)浏览:3333 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:877 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:639 |
1035 题解浏览:868 |
2006年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:375 |
数组输出 (C语言代码)浏览:745 |
众数问题 (C语言代码)浏览:716 |
C语言程序设计教程(第三版)课后习题1.5 (C++代码)浏览:413 |