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("是闰年");
    
        }
    }
  • 相关阅读:
    JQuery缓冲加载图片插件lazyload.js的使用方法
    CSS3阴影 box-shadow的使用和技巧总结
    HTML符号大全
    TouchSlide
    响应式图片的3种解决方案
    ECMAScript arguments 对象
    call() 方法 和 apply()方法详解
    字体图标 iconfont cssfont
    响应式样式
    1-微信小程序创建项目
  • 原文地址:https://www.cnblogs.com/llhhcc/p/9706350.html
Copyright © 2011-2022 走看看