You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
589 B
24 lines
589 B
package N;
|
|
|
|
import java.util.Scanner;
|
|
|
|
class D {
|
|
|
|
public static void main(String[] args) {
|
|
// TODO Auto-generated method stub
|
|
Scanner D=new Scanner(System.in);
|
|
System.out.println("请输入一个整数");
|
|
int d;
|
|
d=D.nextInt();//读取一个int数值
|
|
double a = Math.toRadians(d);//把数字i 转换成 i度
|
|
System.out.println(Math.sin(d));//计算sin i度
|
|
|
|
double b = Math.toRadians(d);
|
|
System.out.println(Math.cos(d));
|
|
|
|
double c = Math.toRadians(d);
|
|
System.out.println(Math.tan(d));
|
|
}
|
|
|
|
}
|