Question: How would I write this in C (printf not cout) program using Visual Studio? Write a program that displays a fast food menu of 3
How would I write this in C (printf not cout) program using Visual Studio? Write a program that displays a fast food menu of 3 items, asks the user for the amount of money they have, and displays how many of each item they could buy for that amount of money. Use constants to hold the prices for the 3 items. Have a blank line after the menu and between the input and the output. Since you will be displaying how many whole items the money can buy, make those integer variables. Follow the 3 steps in the Information Processing Cycle - Input, Processing, and Output. Have a blank line at the end of your program to separate the last line of output from your program from the "Press any key to continue . . .", and do this for all programs that you write.
Example Run #1: (bold type is what is entered by the user)
Fast Food
-------------------------
Hot Dog w/ Chili....$1.50
Cheeseburger........$3.00
Chicken Sandwich....$2.75
How much money do you have? $11.25
With $11.25, you could buy
x Hot Dogs w/ chili, or
x Cheesburgers, or
x Chicken Sandwiches
The example run shows EXACTLY how your program input and output will look.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
