rectanglearea.java

来自「《A first book of java》by Gary J.Bronson 」· Java 代码 · 共 16 行

JAVA
16
字号
// this program calculates the area of a rectangle
// given its length and width
public class RectangleArea
{
  public static void main(String[] args)
  {
    double length, width, area;
    length = 27.3;                           
    width = 13.4;
    area = length * width;
    System.out.println("The length of the rectangle is " + length);
    System.out.println("The width of the rectangle is " + width);
    System.out.println("The area of the rectangle is " + area);
  }
}

⌨️ 快捷键说明

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