Program to find area and perimeter of a square – GW-BASIC Tutorials

Program to find area and perimeter of a square

-Program:

10     REM Program to find area and perimeter of a square in GW-BASIC (BASIC)
20     INPUT “Enter length of side: ” ; L
30     AREA = L*L
40     PERI = 4*L
50     PRINT “Area of square: ” ; AREA
60     PRINT “Perimeter of square: ” ; PERI
70     END

-Algorithm:

STEP 1 START
STEP 2 INPUT L
STEP 3 COMPUTE AREA = L*L
STEP 4 COMPUTE PERI = 4*L
STEP 5 PRINT AREA
STEP 6 PRINT PERI
STEP 7 END

-Program & Output at GW-BASIC Emulator:

Program & output

Program & output


“My posts/articles are not allowed to be stolen/copied anywhere at Cyber space. Doing so will allow me to take a legal action against the copier.”

Related Posts

M.Bakhtiar Zuberi
Hello, I'm M.Bakhtiar Zuberi, the only article poster & owner of this website. Your comments/suggestions are welcomed the most! RajasTutorials.com is a part of 3DPixelz.com network.

Leave a Comment

Kindly solve the following puzzle to prove that you\'re not a bot: