ch2ex14.java
来自「JAVA程序设计 丁岳伟 彭敦陆编著 高等教育出版社示例代码可供JAVA初学者学」· Java 代码 · 共 19 行
JAVA
19 行
public class ch2ex14{
public static void main(String[]args){
int x=10;
int y=-13;
//find max of x,y
int l=Math.max(x,y);
System.out.println(l);
//find the absolute of y
l=Math.abs(y);
System.out.println(l);
//compute 3 to the power of 4
double t=Math.pow(3,4);
System.out.println(t);
//test round
l=(int)(Math.round(3.55));
System.out.println(l);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?