Category : Miscellaneous Language Source Code
Archive   : ADATU2.ZIP
Filename : TRITYPE.ANS

 
Output of file : TRITYPE.ANS contained in archive : ADATU2.ZIP
-- Our solution to Outside Assignment 2:
separate (TRITEST)
function TRITYPE(LEN1, LEN2, LEN3 : in INTEGER) return TRIANGLE is
ANSWER : TRIANGLE;
begin
if LEN1 + LEN2 <= LEN3 or LEN1 + LEN3 <= LEN2 or LEN2 + LEN3 <= LEN1 then
ANSWER := NOT_A_TRIANGLE;
elsif LEN1 = LEN2 and LEN2 = LEN3 then
ANSWER := EQUILATERAL;
elsif LEN1 = LEN2 or LEN2 = LEN3 or LEN1 = LEN3 then
ANSWER := ISOSCELES;
else
ANSWER := SCALENE;
end if;
return ANSWER;
end TRITYPE;


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : ADATU2.ZIP
Filename : TRITYPE.ANS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/