📄 chapter6n2a.java
字号:
/** * * 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -