Scratch that. I fixed it.
Printable View
Scratch that. I fixed it.
Hello ColeTrain!
I think the problem lies in the isValid method. The code in main is fine (except the useless call to isValid before the if statement - but that is not what is giving you the problem). You should probably check again the conditions in the isValid method.
Hope this helps.
Look at the logic in isValid.
Try it with pencil and paper for something that is not a valid triangle, say (1, 1, 3). What will isValid() return for this non-valid set of sides?
Cheers!
Z