diff --git "a/56 \350\265\265\346\225\217/20221203 Java. \344\275\234\344\270\232.md" "b/56 \350\265\265\346\225\217/20221203 Java. \344\275\234\344\270\232.md" deleted file mode 100644 index cd02e342d4ab44976a7d9d5b7892af39f288233a..0000000000000000000000000000000000000000 --- "a/56 \350\265\265\346\225\217/20221203 Java. \344\275\234\344\270\232.md" +++ /dev/null @@ -1,16 +0,0 @@ -import java.util.Scanner; - -public class ll { - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - System.out.println("请输入年份"); - int year=sc.nextInt(); - if (year%4==0&&year%100!=0||year%400==0){ - System.out.println("该年是闰年"); - - }else{ - System.out.println("该年是平年"); - } - } - -} diff --git "a/56 \350\265\265\346\225\217/20221203 Java. \351\227\260\345\271\264.md" "b/56 \350\265\265\346\225\217/20221203 Java. \351\227\260\345\271\264.md" new file mode 100644 index 0000000000000000000000000000000000000000..20d8da12a0ef73193834bf89809c3f98c7d5dd40 --- /dev/null +++ "b/56 \350\265\265\346\225\217/20221203 Java. \351\227\260\345\271\264.md" @@ -0,0 +1,63 @@ + + +```年份 +import java.util.Scanner; + +public class DD2 { + public static void main(String[] args) { + Scanner a=new Scanner(System.in); + System.out.println("请输入年"); + int nian=a.nextInt(); + Scanner b=new Scanner(System.in); + System.out.println("请输入月"); + int yue=b.nextInt(); + Scanner c=new Scanner(System.in); + System.out.println("请输入日"); + int ri=a.nextInt(); + int ey; + if(nian % 4==0 &&nian %100!=0||nian%400==0){ + ey=29; + }else ey=28; + + switch (yue){ + case 1: + System.out.println(ri); + break; + case 2: + System.out.println(ri+31); + break; + case 3: + System.out.println(ri+ey+31); + break; + case 4: + System.out.println(ri+ey+31*2); + break; + case 5: + System.out.println(ri+ey+31*2+30); + break; + case 6: + System.out.println(ri+ey+31*3+30); + break; + case 7: + System.out.println(ri+ey+31*3+30*2); + break; + case 8: + System.out.println(ri+ey+31*4+30*2); + break; + case 9: + System.out.println(ri+ey+31*5+30*2); + break; + case 10: + System.out.println(ri+ey+31*5+30*3); + break; + case 11: + System.out.println(ri+ey+31*6+30*3); + break; + case 12: + System.out.println(ri+ey+31*6+30*4); + break; + } + } + +} +``` diff --git "a/56 \350\265\265\346\225\217/20221205 Java.\344\271\230\346\263\225\350\241\250.md" "b/56 \350\265\265\346\225\217/20221205 Java.\344\271\230\346\263\225\350\241\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..c0e1b84cde6a53c90e66307ab8f930d3b2caac40 --- /dev/null +++ "b/56 \350\265\265\346\225\217/20221205 Java.\344\271\230\346\263\225\350\241\250.md" @@ -0,0 +1,54 @@ +九九乘法表 + +``` +public class D8 { + public static void main(String[] args) { + int i; + int j; + for (i=1;i<10;i++){ + for (j=1;jnum){ + System.out.println("你猜的数字太大了"); + } else if (shuru=2&&count<=6) { + System.out.println("你一点点聪明"); + }else{ + System.out.println("你真蠢"); + } + } +} + + + + +``` + + + + + +``` + +```