Computer Science, asked by rijanshrestha9yearol, 3 months ago

qbasic program to find perimeter of rectangle​

Answers

Answered by shivshankarkumar28
0

Answer:

2(l+b)

Explanation:

The perimeter of rectangle=2(l+b)

Answered by yadavsv09
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