Computer Science, asked by prishakhemka1d44, 1 month ago

A. Write algorithms for the
• To input three sides of a triangle and print if it is scalene, isosceles or equilateral.​

Answers

Answered by sonali373
0

Answer:

Algorithm. Step 1: Declare three sides of triangle. Step 2: Enter three sides at run time. Step 3: If side1 == side2 && side2 == side3 Go to step 6 Step 4: If side1 == side2 || side2 == side3 || side3 == side1 Go to Step 7 Step 5: Else Go to step 8 Step 6: Print the triangle is equilateral

Answered by purveshKolhe
1

Answer:

CLS

INPUT "Enter the first side:",si1

INPUT "Enter second number:",si2

INPUT "Enter third number:",si3

IF si1 = si2 = si3 THEN

PRINT "Equilateral triangle"

ELSEIF si1 = si2 <> si3 THEN

PRINT "Isosceles triangle"

ELSEIF si1 <> si2 <> si3 THEN

PRINT "Scalene triangle"

END IF

END

Similar questions