chapter6n2a.java

来自「JAVA源代码程序aashjkjhkjhkjhjkhkj」· Java 代码 · 共 37 行

JAVA
37 行
字号
/** * * perimeter of field calculation (corrected) * * Written by: Roger Garside * * First Written: 2/Oct/96 * Last Rewritten: 2/Oct/96 * */import java.lancs.* ;public class Chapter6n2a    {    /**     *     * main     *     */    public static void main(String[] args) throws Exception        {        BasicIo.prompt("type the field length in feet: ") ;        int length = BasicIo.readInteger() ;        BasicIo.prompt("type the field breadth in feet: ") ;        int breadth = BasicIo.readInteger() ;        System.out.print("the perimeter of a field " + length + " feet by ") ;        System.out.print(breadth + " feet is ") ;        System.out.print(2 * (length + breadth)) ;        System.out.println() ;        } // end of method main    } // end of class Chapter6n2a

⌨️ 快捷键说明

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