first commit

master
shizihao 4 years ago
parent 4f4f74b40b
commit 34077b7d1d

@ -0,0 +1,29 @@
package ¼ÆËãÆ÷;
public class c {
public double add(double a,double b)
{
return a+b;
}
public double min(double a,double b)
{
return a-b;
}
public double mul(double a,double b)
{
return a*b;
}
public double div(double a,double b)
{
if(b!=0)
return a/b;
else
return 0;
}
}

@ -1,10 +0,0 @@
import java.util.Scanner;
public class c {
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
double a = sc.nextDouble(); //输入rad值
double b = Math.sin(a);//计算sin
double c = Math.cos(a);//计算cos
double d = Math.tan(a);//计算cos
System.out.println("sin值为"+b+" "+"sin值为"+c+" "+"tan值为"+d); }
}
Loading…
Cancel
Save