Computer Science, asked by sumy3688, 11 months ago

Write a qbasic program calculate area of square

Answers

Answered by tanyaprasad1216
44

CLS

REM area of square

LET S=10

LET A=S*S

Print A

END

done....!

hope it helps

Answered by Swoyamshree10
10

Answer:

DECLARE SUB AREA (L)

CLS

INPUT “ENTER LENGTH”; L

CALL AREA(L)

END

SUB AREA (L)

A = L ^ 2

PRINT “AREA OF SQUARE”; A

END SUB

AREA OF A SQUARE USING FUNCTION PROCEDURE

DECLARE FUNCTION AREA (L)

CLS

INPUT “ENTER LENGTH”; L

AR = AREA(L)

PRINT “AREA OF SQUARE ”; AR

END

FUNCTION AREA (L)

A = L ^ 2

AREA = A

END FUNCTION

Similar questions