Need help implementing this Java code
Suppose you are given a right triangle where the point at right angle is always located at (0, 0), the other two points are located at (0, y) and (0, x), respectively, where both x and y are positive values greater than 0.
Write a program that prompts the user to enter values for x and y, and then prints the result of two other angles in degrees.
If the user inputs values less than or equal to 0, then the program should terminate with a message "Incorrect values were entered!". Here is a sample run (and below figure shows it visually).
Enter the values for x, y: 5 4 Computed angles in degrees are 51.34 and 38.6
|