id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

lenpelletier@gmail.com math > findHypotenuse
prev  |  next  |  chance

findHypotenuse() - given two integers that represent the length of the legs of a right triangle, calculate the hypotenuse as a double.


findHypotenuse(1, 0) → 1.0
findHypotenuse(3, 4) → 5.0
findHypotenuse(5, 12) → 13.0

...Save, Compile, Run (ctrl-enter)

public double findHypotenuse(int a, int b) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 10 Post-solution available

Copyright Nick Parlante 2017 - privacy