Algorithm
1.Welcome to our turf company
2.// ask for width
Repeat this ;
3.{
4.Ask user to enter width between 20 feet and 55 feet
5.Get width
6.If ((width<20) or (width >55))
7. Error message
8.}
9.Until (width>=20) and (width <=55))
10.// ask for length between w and 155
11.Repeat this
12.{
13. Ask user to enter length larger than width and less than 155
14. If (length <width) or (length>155)
15. Error Message
16.}
17.Until (Length>=width) and (Length <=155)
18.
19. //Time to find the area!
20.A = length X width
21.
22.// Once you get that number your price would be shown - Price will be given on area that needs turf
23.
24. :
25.If (area<2000ft^2)
26. Show (‘price’);
27.Per m^2 : 5$
28.Cost = A X 5
29.Show “PAY NOW”
30.
31.Price greater than 2000:`
32.If (area>2000ft^2)
33.Choice == ‘Yes’
34. Show (‘price’);
35.Per m^2: 7$
36.Cost = A x 7
37.Show “PAY NOW;
38.End game B
39.PST and GST will be included in your final total
40.Else: ‘error, you can only input ‘yes’ or ‘no’
2.// ask for width
Repeat this ;
3.{
4.Ask user to enter width between 20 feet and 55 feet
5.Get width
6.If ((width<20) or (width >55))
7. Error message
8.}
9.Until (width>=20) and (width <=55))
10.// ask for length between w and 155
11.Repeat this
12.{
13. Ask user to enter length larger than width and less than 155
14. If (length <width) or (length>155)
15. Error Message
16.}
17.Until (Length>=width) and (Length <=155)
18.
19. //Time to find the area!
20.A = length X width
21.
22.// Once you get that number your price would be shown - Price will be given on area that needs turf
23.
24. :
25.If (area<2000ft^2)
26. Show (‘price’);
27.Per m^2 : 5$
28.Cost = A X 5
29.Show “PAY NOW”
30.
31.Price greater than 2000:`
32.If (area>2000ft^2)
33.Choice == ‘Yes’
34. Show (‘price’);
35.Per m^2: 7$
36.Cost = A x 7
37.Show “PAY NOW;
38.End game B
39.PST and GST will be included in your final total
40.Else: ‘error, you can only input ‘yes’ or ‘no’