So i've been set this task as part of revision and have no idea how to go about finishing it:
Write a program to accept three (INTEGER) lengths and report back on whether these
lengths could define an equilateral, isosceles or scalene triangle with 3, 2 or 0 equal length
sides, or whether they cannot form a triangle.
Hint: If three lengths form a triangle then 2 times the longest side must be less than the sum
of all three sides. In Fortran terms, the following must be true for a valid triangle:
(2*MAX( side1 , side2 , side3 ) < side1 + side2 + side3 ).
I have attached what i have done so far as an image.
any help is hugely hugely appreciated!
x Turn on thread page Beta
Fortran programming - help!!! watch
- Thread Starter
- 05-03-2013 13:14
- 05-03-2013 13:45
So what's the problem? You don't know fortran or you don't know understand what you want your code to do?
Ps. posting pictures of code listings angers the dragons.