Algorithm
Karanveer and Jaskaran
A company that makes Pool
- Welcome User to your pool Company
- Ask User for Width between 10 and 50 meters
- Get the Width
- If (width < 10) or (width >50)
- Error Message
- Go to L2
- Ask User for Length between width and 200 meters
- Get the Length
- If (length < width) or (width >200)
- Error Message
- Go to L7
- Ask User for Height between 14 and 25 meters
- Get the Height
- If (height < 14) or (height >25)
- Error Message
- Go to L12
- Calculate volume
- Volume = length * width * height
- say 'Volume is:' + volume + 'cubic meters'
- say 'Length is:' + length + 'meters'
- say 'Width is:' + width + 'meters'
- say 'Height is:' + height + 'meters'
- Calculate the cost based on price of 1 cubic meter
- Ask for price per cubic meter between 100 to 100000
- If price/cost < (100) or cost > (100000):
- Error message
- Go to L21
- Cost = Cost/price * Volume
- GST = GST/100 * Cost/price
- PST = PST/100 * Cost/price
- Total = Cost/price + GST price + PST price
- say 'Cost per meter^3 is: $' + Cost
- say 'PST is: $' + PST price
- say 'GST is: $' + GST price
- say 'Total price is: $' + Total
- Say 'That is everything needed to make a Pool'
- Ask if the user wants to play again
- else:
- say 'invalid input, you can only choose either yes or no'
- loop back to line
- If choice == 'yes'
- loop back to line 1
- If choice == 'no'
- end program