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,
2 months ago
English,
2 months ago
World Languages,
2 months ago
Environmental Sciences,
4 months ago
Hindi,
4 months ago
Math,
10 months ago
Math,
10 months ago
Social Sciences,
10 months ago