about | help | code help+videos | done | prefs |
Write a method that accepts three integer parameters representing a, b, and c (in that order) indicating the sides of a right triangle with hypotenuse c. One (and only one) of the parameters will be a negative number. The negative number is used to indicate which variable is the unknown. Solve for that unknown and return its value as a double. triangleSolve(5, 3, -1) → 5.830951894845301 triangleSolve(9, 11, -3) → 14.212670403551895 triangleSolve(-6, 70, 71) → 11.874342087037917 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 440 Post-solution available
Copyright Nick Parlante 2017 - privacy