1. A program is required to read the length and width of a rectangle. Calculate and print the area of the rectangle.
Input Processing Output
Read Read length, width Print area
Length, Calculate area
Width Area – length*width
Print area
Pseudocode Algorithm: Area of a rectangle
Author/Developer: Olukemi Ogunde
Date: October 4, 2024
This algorithm will find the area of a rectangle
Declare length, width, Area as real
Length, width, area ←0
START
Print “Enter length, width”
Read length, width
Area ← length*width
Print “The area is”, Area =
STOP
2. A program is required to read the length and width of a rectangle. Calculate and print the perimeter of the rectangle.
Input Processing Output Pseudocode Algorithm: Perimeter of
Read Read length, width Print perimeter
a rectangle
Length1, Calculate perimeter
Width1, Perimeter – (length + width)*2 Author/Developer: Olukemi Ogunde
Print perimeter
Date: October 4, 2024
This algorithm will find the perimeter of a rectangle
Declare length, width, perimeter as real
Length, width, perimeter – 0
START
Print “Enter length, width”
Read length, width
Perimeter – (length + width) *2
Print “The perimeter is”, Perimeter =
STOP
3. A program is required to input the price of an item and quantity purchased. The program should compute and print the amount due.
Input Processing Output
Read Read price, quantity Print amount_due
Price, Calculate amount due 2
quantity Amount_ due price*quantity
Print amount_due Pseudocode Algorithm: Amount due
for a purchase
Author/Developer: Olukemi Ogunde
Date: October 4, 2024
This algorithm will find the amount due for the purchase of an item.
Declare price, Amount_due as real
Declare quantity as integer
Price, quantity, amount_due 0
START
Print “Enter price, quantity”
Read price, quantity
Amount_due price*quantity
Print “The amount due is”, Amount due
STOP