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

 

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

In any triangle, the sum of the lengths of any 2 sides must be greater than the length of the 3rd side. For example, 3, 7, and 12 could not be the sides of a triangle because 3 + 7 <= 12. Given three positive integers, return true if those integers could be the sides of a triangle, and false otherwise.


makeTriangle(3, 4, 5) → true
makeTriangle(8, 10, 1) → false
makeTriangle(5, 5, 5) → true

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

boolean makeTriangle(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