• java第一天


      /********************************************************
       * 浮点数的计算
       *
       * System.out.println("整形和浮点型的除法比较:");
       *
       * System.out.println("10 / 3 * 3=" + 10 / 3 * 3);
       *
       * System.out.println("10 / 3.0 * 3=" + 10 / 3.0 * 3);
       *
       * System.out.println("浮点数的精度:" + (1.2 - 1.1) * 10);
       *
       * int foot;
       *
       * int inch;
       *
       * Scanner in = new Scanner(System.in);
       *
       * System.out.print("请输入英尺:");
       *
       * foot = in.nextInt();
       *
       * System.out.print("请输入英寸:");
       *
       * inch = in.nextInt();
       *
       * System.out.println("foot=" + foot + ",inch=" + inch);
       *
       * System.out.println("转换结果:" + ((foot + inch / 12.0) * 0.3048) +
       * "单位:(m)");
       ***********************************************************/

      /***********************************************************
       * 输入
       *
       * System.out.println( "Hello World!");
       *
       * Scanner in = new Scanner(System.in);
       *
       * System.out.println("echo:" +in.nextLine());
       *
       * int amount = 100;
       *
       * int price = 0; System.out.print("请输入票面:");
       *
       * amount = in.nextInt(); System.out.print("请输入金额:");
       *
       * price = in.nextInt();
       *
       *
       * System.out.println(amount + "-" + price + "=" + (amount - price));
       ***

    不犯罪盗版→提高自我技术
  • 相关阅读:
    c# 测试篇之Linq性能测试
    F# 笔记
    c# DataSource和BindingSource
    .net中配置的保存格式笔记
    泛型约束(转)
    c# 调用showDialog后需要Dispose
    c# 实现ComboBox自动模糊匹配
    c# 二进制或算法实现枚举的HasFlag函数
    C# WinForm自定义控件整理
    微软中文MSDN上的一些文章链接
  • 原文地址:https://www.cnblogs.com/zoudajia/p/5497732.html
Copyright © 2020-2023  润新知