Yes i know everyone hates homework help but this was a last place i could go I am writing a program that stimulates a vending machine and i have written almost all of the code its just not working correctly I am stressing out because it is due by tomorrow and was wondering if anyone would be able to help me out in any way possible i have attached the *.cpp file and would be willing to do anything if someone would look over it Im not asking for you to completly due it just help me becase i am stuck and do not know were to turn.
In the program it is to give change back which i am having trouble doing so because it breaks it down into half dollars dollars dimes quarters and nickles its really the only problem i have i have written code that i believed to work but it has not if anyone is out there please help
This is what the outcome should look like http://www.cs.ua.edu/114/Summer2004/Programs/prog2.htm
SmartService generates live updates from our vending machines every six hours, informing us what has sold and when machines need maintenance. We analyze the selling data, using it to select the exact products needing replenishment in each machine, guaranteeing you have the right product mix at all times. Institution’s mission and aims. The program’s annual evaluation must include an assessment of the program’s efforts to recruit and retain a diverse workforce, as noted in V.C.1.c).(5).(c). It is a national high-tech enterprise integrating R&D, production, sales and service. The main products include: intelligent vending machines, intelligent drinks vending machines, service-oriented AI robots and other commercial equipment, while providing supporting equipment control systems, background management system software development.
I am writing a vending machine program and below is what I have so far. I have most of the program written. What I need it to do is at the drink selection screen be able to enter 'master' instead of selection and go into a secret menu. In that menu the user should be asked for a password. The password can be something like 'DRINKS'.
- 6 Contributors
- forum11 Replies
- 2,079 Views
- 3 Days Discussion Span
- commentLatest PostLatest Postby Fili
Dev C Vending Machine Programming
Recommended Answers
Gee, you sure were in a hurry but the lack of full stops really mangles what you say.
This is not really a place to ask for homework answers.But I did look at your code and you use a lot of variables like a,b,c etc for what resonable puprose …
Jump to PostDev C Vending Machine Program Free
Quite nice,Fili
Jump to PostI dont think so,it will be of some use to someone,hey teachers usally accept a submission even if it a bit late.
Jump to PostAll 11 Replies
Gee, you sure were in a hurry but the lack of full stops really mangles what you say.
Dev C Vending Machine Programram
This is not really a place to ask for homework answers.But I did look at your code and you use a lot of variables like a,b,c etc for what resonable puprose I cant guess.Also code is a bit messed up in the sense that it too packed where you calculate the vals so I could not understant it too much either.
But here's something :
Lesson1:Code clearly and use spaces and newlines.They will save your life when it comes to debugging.Noodle code is a death trap.(Your code is not too noodlely except in the if else part).
Lesson 2:Use funtions (I dont know if you know funtions)
Now your prob:One Idea would be to convert the entire amount in to the lowest denomintions availble(nickle?) and calulate using that.In the end convert it back to dollars and show what ever remanins as nickles.Dont bother with quaters unless you have to.
Not much but i could not understand you code nor what was you prob,nor do i have a compiler handy right now. :0