QBASIC PROGRAM TO FIND PERIMETER OF RECTANGLE

QBASIC PROGRAM TO FIND PERIMETER OF RECTANGLE



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

USING SUB


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

Post a Comment

0 Comments