WAP to find whether a triangle is equilateral triangle or not

Qbasic program find whether a triangle is equilateral triangle or not



CLS
 INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
 IF A = B AND B = C THEN
 PRINT “IT IS A EQUILATERAL TRIANGLE”
 ELSE
 PRINT “IT IS NOT A EQUILATERAL TRIANGLE”
 END IF
 END SUB

USING SUB


DECLARE SUB EQUILATERAL(A,B,C)
 CLS
 INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
 CALL EQUILATERAL(A,B,C)
 END
 
 SUB EQUILATERAL(A,B,C)
 IF A = B AND B = C THEN
 PRINT “IT IS A EQUILATERAL TRIANGLE”
 ELSE
 PRINT “IT IS NOT A EQUILATERAL TRIANGLE”
 END IF
 END SUB

Post a Comment

0 Comments