# Question: How to write a procedure to determine if values are length of a triangle?

February 19 2013 by
false
Maple 16

0

Q3) Write a procedure, isTriangle, to determine if any three given
 numbers represent the lengths of the sides of a triangle.       The procedure should be able to deal with any input.I have done the following and get an error

isTriangle:=proc(a,b,c::nonnegative and numeric)if (a^2+b^2)=c^2 then print (a,b,c "represent the sides of a triangle")end if;end proc;Error, unexpected string
when stated 'unexpected string', the cursor is moved to the
word triangle between the l and e

is there something wrong with my procedure?
many thanks