parent
99976f4534
commit
b47c78597c
@ -0,0 +1,16 @@
|
|||||||
|
public class Trigonometric_Functions {
|
||||||
|
public Trigonometric_Functions(String chose,double Value) {
|
||||||
|
double a = Math.toRadians(Value);
|
||||||
|
switch(chose) {
|
||||||
|
case "sin":
|
||||||
|
System.out.println(String.format("%.2f",Math.sin(a)));
|
||||||
|
break;
|
||||||
|
case "cos":
|
||||||
|
System.out.println(String.format("%.2f",Math.cos(a)));
|
||||||
|
break;
|
||||||
|
case "tan":
|
||||||
|
System.out.println(String.format("%.2f",Math.tan(a)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue