math.sin in java code example
Example 1: math.sin java
double pi = Math.PI;
double ans = Math.sin(pi/2); //Input is in radians
ans == 1;
Example 2: math.sin in java
double pi = Math.PI;
double ans = Math.sin(pi/2); //Input is in radians
if(ans==1){
System.out.println("You Find it");
}
else{
System.out.println("You are unlucky today");
}