zoukankan      html  css  js  c++  java
  • 练习题

    import java.util.Scanner; //表示输入

    public class Operation

    {
             public static void main(String[] args)  //有的直接在打印处提示的  就不做注释了

        {
        long l=123456789012345l;
        System.out.print("这个长整数的的值是:"+l+" ");

        float f=2.4f;
        System.out.print("这个单精度的小数是:"+f+" ");

        boolean b=true;
        b=false;
        System.out.print("这个布尔型变量的值是:"+b+" ");

        byte _b=3;
        _b=(byte)(_b+200);
        System.out.print(_b);

        System.out.print((char)('a'+1)+" "); //输出两个字符型
        System.out.print((char)('你'+1)+" ");

        int e=Integer.MAX_VALUE+1; //
        System.out.print(e);

        @SuppressWarnings("resource") 
        Scanner input=new Scanner(System.in); //可以输入了
        double t;  //剩下的就是打印了
        System.out.print("Enter the x "+" ");
        t = Double.valueOf(input.nextDouble());
        t=t/1000*1000;
        System.out.print("The calculation result is " + t +" ");


      }
    }

  • 相关阅读:
    第07组 Alpha事后诸葛亮
    第07组 Alpha冲刺(4/4)
    第07组 Alpha冲刺(3/4)
    第07组 Alpha冲刺(2/4)
    第07组 Alpha冲刺(1/4)
    2021-7-15
    2021-7-13工作笔记
    第07组 Beta版本演示
    第07组 Beta冲刺(2/4)
    第07组 Beta冲刺(3/4)
  • 原文地址:https://www.cnblogs.com/jingjing1314/p/7591259.html
Copyright © 2011-2022 走看看