1. Engineering
  2. Computer Science
  3. write code in java...

Question: write code in java...

Question details

write code in Java 1. Johnny needs a program to help him graph the function: f(x) - 3cos(x) + 5. Write a program to evaluate this function from 0 degree to 360 degrees. The increment (an angle in degree) is given by the user when the program is executed. For example, if the angle entered by the user is 10 degrees, the program evaluates the function starting at angle (or x) = 0 degree, then at 10 degrees, 20 degrees,.., while the angle is no more than 360 degrees. A sample run based on the 10-degree angle increment looks like: Enter the increment angle in degree: 10 10 20 30 f(sx) 8.0000 7.9544 7.8191 7.5981 340 350 360 7.8191 7.9544 8.0000

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution