QBASIC PROGRAM TO FIND AREA AND PERIMETER OF RECTANGLE

QBASIC PROGRAM TO FIND AREA AND PERIMETER OF RECTANGLE



 CLS
 INPUT “ENTER LENGTH”; L
 INPUT “ENTER BREADTH”; B
 A= L * B
 P = 2 * (L + B)
 PRINT “AREA OF RECTANGLE “; A
 PRINT “PERIMETER OF RECTANGLE ”; P
 END

USING SUB


DECLARE SUB AP(L,B)
 CLS
 INPUT “ENTER LENGTH”; L
 INPUT “ENTER BREADTH”; B
 CALL AP(L,B)
 END
 
 SUB AP(L,B)
 A= L * B
 P = 2 * (L + B)
 PRINT “AREA OF RECTANGLE “; A
 PRINT “PERIMETER OF RECTANGLE ”; P
 END SUB

Post a Comment

0 Comments