Answer the question
In order to leave comments, you need to log in
How to solve this equation in java?
Hello! there is an equation:
In general, I have no idea how to solve it, but I did it like this:
public static void main(String[] args) {
double x;
double y;
Scanner scan = new Scanner(System.in);
System.out.println("Введите х:");
double user = scan.nextDouble();
if(user > 0){
double a = Math.sin(2) * user;
System.out.println(a);
}
else {
double b = 1 - 2 * Math.sin(Math.pow(user,2));
}
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