Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Im so confused.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bossco224




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
lordroba




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: