Computer Science Canada

Im so confused.

Author:  bossco224 [ Sun Nov 06, 2016 4:08 pm ]
Post subject:  Im so confused.

I just started turing and I have an assignment for my turing class. I have gotten through the first part but need help for this.

4. Display a list of menu options [5 items with a number next to each item. All meals cost $9.95 each]. User selects the item they want using the number [press enter] and repeat this process for each meal they will be ordering. Redisplay the list after each menu item selected.
5. Calculate the sub total for the meals entered, and the tax. Prompt the user for the Cash paid, and calculate the change to be returned.
6. Display a ‘receipt’ for the order that includes the meal items ordered and subtotal, 13% tax, total, cash paid and change.

Author:  lordroba [ Sun Nov 06, 2016 9:33 pm ]
Post subject:  Re: Im so confused.

You will need to use a series of get and put statements and then work with variables to calculate the total. I'm not sure how far along you are in your course, but you can display the menu items with 'put' statements like this:

Turing:

put "1. Item a"
put "2. Item b"
....


Then use the 'get' command to ask the user to input their choice

Turing:

var: itemnumber: int
get itemnumber


the 'get' command can also be used to ask the user for the amount tendered. Try getting some code down and if you get stuck, try using the built in reference, it's really useful. We can help more specifically if you're still having trouble.


: