trigonometricdemo.java
来自「北大Java 语言程序设计 ppt课件及源码」· Java 代码 · 共 15 行
JAVA
15 行
public class TrigonometricDemo { public static void main(String[] args) { double degrees = 45.0; double radians = Math.toRadians(degrees); System.out.println("The value of pi is " + Math.PI); System.out.println("The sine of " + degrees + " is " + Math.sin(radians)); System.out.println("The cosine of " + degrees + " is " + Math.cos(radians)); System.out.println("The tangent of " + degrees + " is " + Math.tan(radians)); System.out.println("The arc sine of " + degrees + " is " + Math.asin(radians)); System.out.println("The arc cosine of " + degrees + " is " + Math.acos(radians)); System.out.println("The arc tangent of " + degrees + " is " + Math.atan(radians)); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?