Or, as Wikipedia puts it: Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading. Write a c program to simulate a vending machine. Your vending machine will be limited to 5 items only (soda, water, coffee, chocolate, gum). Soda costs $3, water costs $2, coffee costs $5, chocolate costs $4, and gum costs $1.
Similar topics
Dev C Vending Machine Programram
reply views Thread by joestevens232 | last post: by |
9 posts views Thread by vpascuzzi | last post: by |
7 posts views Thread by JohnSmith70 | last post: by |
2 posts views Thread by nb999 | last post: by |
1 post views Thread by Kunthea | last post: by |
3 posts views Thread by ismaeel | last post: by |
1 post views Thread by abil | last post: by |
3 posts views Thread by exospire | last post: by |
reply views Thread by PrototypeChain | last post: by |
reply views Thread by dreamtext | last post: by |
1 post views Thread by CARIGAR | last post: by |
reply views Thread by zhoujie | last post: by |
reply views Thread by Xillez | last post: by |
reply views Thread by Gingerbreadman | last post: by |
1 post views Thread by Gingerbreadman | last post: by |
reply views Thread by razodiac | last post: by |
1. The user display shows a start-up message welcoming the customer and invites him/her to proceed by pressing a key on the keypad.
2. On pressing a key a menu is displayed offering four choices of drinks and an option to cancel.
3. When a choice has been made the display indicates the drink chosen along with its price and an option to continue. Each of the drinks has a different price.
4. If the option chosen is not to continue the user is returned to the welcome screen. Conversely, if the user elects to continue then a question requesting the quantity required is displayed along with an indication that the maximum that can be ordered is five.
6. Subsequent messages will request the amount of money to be inserted, a list of the coins that can be inserted i.e. 5p, 10p, 20p, 50p and 100p, a total of the amount inserted as the coins are inserted and a reducing amount outstanding as the money is inserted. The money is inserted by typing its value on the keyboard. When the value of a coin entered is not allowed the user is simply returned to the display requesting payment.
7. When the value of the drinks ordered has been reached or exceeded a message indicating that the drinks are being dispensed is shown. In detail this message will name the drink and quantity ordered, indicate that the drink is being dispensed along with the quantity ordered e.g. if three drinks have been ordered then the message will show a count up from three as each of the drinks is dispensed. A suitable time will elapse as each drink is dispensed.
8. On completion of the dispensing of the drinks a 'Thank you' message will be shown.
9. When the value of money inserted exceeded that required then a message indicating the difference between the two is to be collected will also be shown on the ‘Thank you’ message.
I already made a program, but I'm having some problems with the money part of it as changes in my cost aren't showing up (all money shows up as zero) and my attempt at having only a certain type of coin available seems to be bad and doesn't quite work.2. On pressing a key a menu is displayed offering four choices of drinks and an option to cancel.
3. When a choice has been made the display indicates the drink chosen along with its price and an option to continue. Each of the drinks has a different price.
4. If the option chosen is not to continue the user is returned to the welcome screen. Conversely, if the user elects to continue then a question requesting the quantity required is displayed along with an indication that the maximum that can be ordered is five.
6. Subsequent messages will request the amount of money to be inserted, a list of the coins that can be inserted i.e. 5p, 10p, 20p, 50p and 100p, a total of the amount inserted as the coins are inserted and a reducing amount outstanding as the money is inserted. The money is inserted by typing its value on the keyboard. When the value of a coin entered is not allowed the user is simply returned to the display requesting payment.
7. When the value of the drinks ordered has been reached or exceeded a message indicating that the drinks are being dispensed is shown. In detail this message will name the drink and quantity ordered, indicate that the drink is being dispensed along with the quantity ordered e.g. if three drinks have been ordered then the message will show a count up from three as each of the drinks is dispensed. A suitable time will elapse as each drink is dispensed.
8. On completion of the dispensing of the drinks a 'Thank you' message will be shown.
9. When the value of money inserted exceeded that required then a message indicating the difference between the two is to be collected will also be shown on the ‘Thank you’ message.