Pseudocode
Pseudocode
Module main()
Call intro()
Declare String landShape
Declare Real landArea, pricePerSqUnit, totalPrice
Set landShape = getShape()
Set landArea = getArea(landShape)
Set pricePerSqUnit = getPrice()
Set totalPrice = calcPrice(landArea, pricePerSqUnit)
Display The area of the land is , landArea, sq. ft.
Display The total cost for carpeting the land area is $, totalPrice
End Module
// Intro module
Module intro()
Display This program takes a shape of the land and calculates its area. You can also
select a carpet from the following options and the program will return the total cost for carpeting
the given land area. (Unit of all lengths entered should be ft.)
Display Cost for carpet A is $1.2 per sq. ft.
Display Cost for carpet B is $3.5 per sq. ft.
Display Cost for carpet C is $7 per sq. ft.
End Module
Return shape
End Function