Computer Science, asked by nidhi5506, 8 days ago

Write programs : Print the area and perimeter of a square in Qbasic

Answers

Answered by tajit9914
0

Answer:

here is your ans

Explanation:

QBasic Programming

1) REM PROGRAM TO DISPLAY AREA AND PERIMETER OF SQUARE. INPUT “ENTER LENGTH”; L. ...

2)DECLARE SUB AREA (L) DECLARE SUB PERIMETER (L) ...

3)SUB AREA (L) A = L ^ 2. ...

4) SUB PERIMETER (L) P = 4 * L. ...

5) DECLARE FUNCTION AREA (L) DECLARE FUNCTION PERIMETER (L) ...

6) FUNCTION AREA (L) AREA = L ^ 2. ...

7) FUNCTION PERIMETER (L) PERIMETER = 4 * L.

Similar questions