Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

WoodType[1] ← “Laminate”

WoodType[2] ← “Pine”
WoodType[3] ← “Oak”
Price[1] ← “29.99”
Price[2] ← “39.99”
Price[3] ← “54.99”
Valid= FALSE
For Count ← 1 to 100
OUTPUT “Please enter your name”
INPUT CustomerName
Customers [Count] ← CustomerName
REPEAT
OUTPUT “Please enter room length and width in metres”
INPUT Length, Width
IF Length >=1.5 AND Length <=10 AND Width >=1.5 AND Width <=10
THEN
OUTPUT “Suitable measurements”
Valid= TRUE
ELSE
OUTPUT “Unsuitable measurements. Re enter measurements”
Valid= FALSE
ENDIF
UNTIL Valid= TRUE
RoomArea= Length * Width
OUTPUT “What type of wood do you want? We have” , Woodtype[1], Woodtype[2], Woodtype[3]
INPUT WoodChoice
CASE OF WoodChoice
‘1’: TotalPrice ← RoomArea * Price[1]
‘2’: TotalPrice ← RoomArea * Price[2]
‘3’: TotalPrice ← RoomArea * Price[3]
OTHERWISE OUTPUT “Invalid Input”
ENDCASE
ENDCASE
Quotations[Count, 1] ← Length
Quotations[Count, 2] ← Width
Quotations[Count, 3] ← RoomArea
Quotations[Count, 4] ← WoodChoice
Quotations[Count, 5] ← TotalPrice
OUTPUT “Quotation for”, CustomerName, “who chose wood of type: ”, WoodType[WoodChoice], “Totalling to $ “ , TotalPrice
Next Count

You might also like