zoukankan      html  css  js  c++  java
  • Java2

    //
    import java.time.Instant;
    
    /**
     * Created by Administrator on 2018/9/26.
     */
    import java.util.*;
    public class mian {
        public static void main(String arge[]) {
            System.out.println("请输入年份");
            Scanner in = new Scanner(System.in);
            int year;
            year = in.nextInt();
            if (year % 4 == 0 && year % 400 == 0) {
                System.out.println("是闰年");
            }
            if (year % 100 != 0) {
                System.out.println("是平年");
            } else {
                System.out.println("是闰年");
            }
            System.out.println("请输入月份");
            int month;
            month= in.nextInt();
    
            switch(month){
                case 2:
                    System.out.println( month + "月有28");
                    break;
                case 1:
                    break;
                case 3:
                    break;
                case 5:
                    break;
                case 7:
                    break;
                case 8:
                    break;
                case 10:
                    break;
                case 12:
                    System.out.println(month + "月有31");
                    break;
                default:
                    System.out.println( month + "月有30");
                    break;
            }
    
        }
    }
     * Created by Administrator on 2018/9/26.
     */
    public class lian
    {
        public static void main(String arge[]){
            int a=10;
            double x=2.3;
            double c=x+a;
            int u=(int)x+a;
            boolean t=2>8||9>2;//或运算
            boolean v=2>8&&9>2;//与运算
            int r=10;
            ++a;
            r++;
            a--;
            --r;
            System.out.println(a++);
            System.out.println(++r);
            System.out.println(u%x);
            System.out.println(Math.atan(-x));
        }
    }
    //import java.time.Instant;
    
    /**
     * Created by Administrator on 2018/9/26.
     */
    import java.util.*;
    public class mian {
        public static void main(String arge[]){
            int month;
            System.out.println("请输入");
            Scanner in=new Scanner(System.in);
            int year;
            year = in.nextInt();
            if(year%4==0&&year%400==0){
                System.out.println("是闰年");
            }
            if (year%100!=0){
                System.out.println("是平年");
            }
            else
                System.out.println("是闰年");
    
        }
    }
  • 相关阅读:
    POJ_2387_最短路
    HDU_3172_带权并查集
    Python_多线程1(创建线程,简单线程同步)
    POJ_3013_最短路
    codeforces_725C_字符串
    python_文件io
    codeforces_731D_(前缀和)(树状数组)
    codeforces_738D
    java反射机制
    struts2入门
  • 原文地址:https://www.cnblogs.com/llhhcc/p/9706350.html
Copyright © 2011-2022 走看看