Problem Statement: Simulate a vending machine! Your vending machine should prese
ID: 3620553 • Letter: P
Question
Problem Statement:Simulate a vending machine!
Your vending machine should present the user with at least 3 products they can
purchase. The user should be able to purchase as many products and as many of each
product as they wish, in any order.
When the user wants to finalize their purchases (check out) they should be prompted
for an amount of money to pay the total bill. If the user needs change, print out the
amount.
I've only learned iostream and cmath, so if we could keep this as basic as possible I would greatly appreciate it. Thanks
Explanation / Answer
#include using namespace std; int main(){ int cokePrice=1; int potatoChipsPrice=2; int cookiePrice=3; int userInput=1; double total; double paid; double change; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.