Answer to Question #285833 in Java | JSP | JSF for Arslan Habib

Question #285833

Implement the following equation

 

          3x4sin(180x) + 4x3cos(90x) + x2sin(tan(45)) + 7x + 9cos(90x2 )

 

Where x may be user defined value.

Java Language


1
Expert's answer
2022-01-09T13:06:10-0500
import java.util.Scanner;

public class Main
{
    public static void main (String[] args)
    {
        Scanner in = new Scanner(System.in);
        System.out.println("Enter x:");
        double x = in.nextDouble();

        double result = 3 * Math.pow(x, 4) * Math.sin(180*x) + 4 * Math.pow(x, 3) * Math.cos(90*x) +
               x*x * Math.sin(Math.tan(45)) + 7*x + 9 * Math.cos(90 * x*x);

        System.out.println("Result of equation: " + result);
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog