calculatepay.java

来自「Java 入门书的源码」· Java 代码 · 共 16 行

JAVA
16
字号
// Copyright (c) 1998, Arthur Gittleman
//This example is provided WITHOUT ANY WARRANTY either expressed or implied.

/*  Uses the if statement */

import iopack.Io;
public class CalculatePay {
  public static void main(String [] args) {
    int hours;
    hours = Io.readInt("Enter the hours worked this week");  
    if (hours > 40) 
      System.out.println("You worked overtime this week");
    System.out.println("You worked " + hours + " hours");
  }
}

⌨️ 快捷键说明

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