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!
Fortran programming - help!!! Watch
- 4 followers
- 1 badge
- Thread Starter
- 05-03-2013 12:14
- 30 followers
- 19 badges
- 05-03-2013 12: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.