KnowledgeBoat Logo

Computer Applications

Write algorithm to input three sides of a triangle and print if it is scalene, isosceles or equilateral.

Algo & Flowcharts

275 Likes

Answer

Algorithm

Step 1: Start
Step 2: Read three sides of triangle and store them in a, b, c.
Step 3: Check if a == b and b == c
Step 4: If true, print "Equilateral Triangle" and goto step 8
Step 5: Check if a == b or b == c or c == a
Step 6: If true, print "Isosceles Triangle" and goto step 8
Step 7: Print "Scalene Triangle"
Step 8: Stop

Answered By

171 Likes


Related Questions