⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readinteger.java

📁 Java 入门书的源码
💻 JAVA
字号:
//Copyright (c) 1998, Arthur Gittleman
//This example is provided WITHOUT ANY WARRANTY either expressed or implied.

/*    Uses readInt method to read integer values 
 *    from the keyboard.  Outputs the sum of the
 *    three inputs.
*/

import iopack.Io;
public class ReadInteger {
  public static void main(String [ ] args) {
    int x, y, z, result;
    x = Io.readInt("Enter the first number");
    y = Io.readInt("Enter the second number");
    z = Io.readInt("Enter the third number");
    result = x + y + z;
    System.out.println("The result is " + result);
    Io.readString("Press any key to exit");   // Added for IDE use
  }
}   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -