qbasic program to find perimeter of rectangle
Answers
Answered by
0
Answer:
2(l+b)
Explanation:
The perimeter of rectangle=2(l+b)
Answered by
1
Answer:
. Display perimeter of rectangle.
REM PROGRAM TO DISPLAY PERIMETER OF RECTANGLE
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
P = 2 * (L + B)
PRINT “PERIMETER OF RECTANGLE ”; P
END
USING SUB PROCEDURE
DECLARE SUB PERIMETER (L, B)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
CALL PERIMETER(L, B)
END
SUB PERIMETER (L, B)
P = 2 * (L + B)
PRINT “PERIMETER OF RECTANGLE ”; P
END SUB
USING FUNCTION PROCEDURE
DECLARE FUNCTION PERIMETER (L, B)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
PR = PERIMETER(L, B)
PRINT “PERIMETER OF RECTANGLE ”; PR
END
FUNCTION PERIMETER (L, B)
P = 2 * (L + B)
PERIMETER = P
END FUNCTION
Hope it helps ❤️ and please mark me brainlist
Similar questions
Math,
1 month ago
Math,
1 month ago
Environmental Sciences,
3 months ago
Hindi,
3 months ago
Math,
9 months ago
Math,
9 months ago
Social Sciences,
9 months ago