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

 

norm.krumpe@muohio.edu ifproblems > isRightTriangle
prev  |  next  |  chance

Given three integers a, b, and c, return true if a, b, and c could be the lengths of the sides of a right triangle. Return false otherwise. Recall that in a right triangle, each side must have a positive length, and the sum of the squares of the leg lengths must equal the square of the length of the hypotenuse.


isRightTriangle(3, 4, 5) → true
isRightTriangle(4, 3, 5) → true
isRightTriangle(5, 4, 3) → true

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

boolean isRightTriangle(int a, int b, int c) { }

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: 100

Copyright Nick Parlante 2017 - privacy