# Write an Algorithm and program to enter the length & breadth of a room and calculate and print its area and perimeter.

Solution:

1. Aim of Experiment: To calculate the and print the area and perimeter of a room.
2. system Requirement:
1. Software:
1. O/S: Win 98 or Above
2. Application: Qbasic software
2. Hardware:
1. Processor: PIV or Above
2. RAM: 64 MB or Above
3. Algorithm:

Step 1: Start

Step 2: Assign the value of length and breath

Step 3: Calculate the area and perimeter using formula area=lxb and perimeter=4πr2

Step 4: Print area and perimeter

Step 5: Stop

1. Flowchart:

Draw the flowchart…

1. Source Code:

CLS

PRINT “****Calculate the Area and perimeter of room****”

PRINT “######################################”

LET pi=3.14

INPUT “Enter the length :”, l

INPUT “Enter the Breath :”, b

area = l * b

PRINT “Area=”, area

INPUT “Enter the Radius”, r

perimeter = 4 * pi * (r * r)

PRINT “Perimeter=”, perimeter

END

6. Output:

Enter the Length: 5

Enter the Breath: 6

Area=30

Enter the Radius: 3

Perimeter = 113.04

7. Conclusion:  Likewise using above source code and formula we can find out the Area and or perimeter of a room in QBasic Programming.