196k views
5 votes
write the algorithm, flowchart and BASIC program to calculate the area of the rectangle length 50m and width 30m.​

User MouTio
by
4.5k points

1 Answer

3 votes

Answer:

The Basic Program is as follows:

10 LENGTH = 50

15 WIDTH = 30

20 AREA = WIDTH * LENGTH

25 PRINT AREA

30 END

The Algorithm is as follows:

1. Start

2. Let Length = 50

3. Let Width = 30

4. Compute Area = Length * Width

5. Display Area

6. Stop

See Attachment for flowchart (flowchart is designed using draw io tools)

Step-by-step explanation:

The flowchart, algorithm and basic program all follow the same sequence and explanation

Using the basic program as a case study;

Line number 10: The program starts by initializing LENGTH to 50

Line number 15: It then initializes WIDTH to 30

Line number 20: The AREA is calculated by LENGTH * WIDTH

Line number 25: The value of AREA is printed afterwards

Line number 30: Lastly, the program stops execution

write the algorithm, flowchart and BASIC program to calculate the area of the rectangle-example-1
User DougBTV
by
4.5k points