Next: Solution
Up: Control StructureIntrinsics and
Previous: Control StructureIntrinsics and
Write a program to accept three (INTEGER) lengths and report back on
whether these lengths could define an equilateral, isosoles or scalene triangle
(3, 2 or 0 equal length sides) or whether they cannot form a triangle.
Demonstrate that the program works by classifying the following:
- (1, 1, 1)
- (2, 2, 1)
- (1, 1, 0)
- (3, 4, 5)
- (3, 2, 1)
- (1, 2, 4)
Next: Solution
Up: Control StructureIntrinsics and
Previous: Control StructureIntrinsics and
Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 14:10:26 GMT 1996