Answer the question
In order to leave comments, you need to log in
Where I did not make a mistake when compiling the log. expressions?
It is necessary to check whether the point is included in the given area. Here is the picture
Here is my code
import java.util.Locale;
import java.util.Scanner;
public class lesson1_5 {
public static void main (String[] args) {
Scanner MyScanner = new Scanner(System.in);
MyScanner.useLocale(Locale.US);
double x = MyScanner.nextDouble(), y = MyScanner.nextDouble();
System.out.println((x >= 0 && y >= 0 && y <= 0.5 && (y <= Math.sin(Math.toRadians(x)))?"Yes":"No"));
MyScanner.close();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question