Dev C%2b%2b Vending Machine Program

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

  • 6 Contributors
  • forum11 Replies
  • 2,034 Views
  • 3 Days Discussion Span
  • commentLatest PostLatest Postby Fili
DevMachines

Recommended Answers

Gee, you sure were in a hurry but the lack of full stops really mangles what you say.

Machine

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. Vending machine - problem 3; washing machine c 1; Help with an array problem 9; C Help With Smallest Denominations of Coin Change. 9; Slot machine: Words instead of numbers, and more. 11; How to rebuild a struct from bytes after transfer C# 3; Interview with Bjarne Stroustrup, Creator of C 23; update.sql file in client machine 1. New Smart Vending Development. An all-in-one comprehensive kit to get you started developing next generation Smart Vending machines, with state-of-the-art features such as Real-time Telemetry/2-way Remote Management, Digital Signage, Cashless Payment via single shared internet connection, to name a few! Write a program that presents the user w/ a choice of your 5 favorite beverages (Coke, Water, Sprite., Whatever). Then allow the user to choose a beverage by entering a number 1-5. Output which beverage they chose. ★ If you program uses if statements instead of a switch statement, modify it to use a switch statement. All of our new vending machines come with a one year warranty which covers all parts of the machine. All of our used, pre-owned or refurbished machines come with a 3 month warranty. Best of all, when you buy from The Discount Vending Store, we offer a lifetime of technical support on every vending machine we sell.

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 Post

Quite nice,Fili

Jump to Post

I dont think so,it will be of some use to someone,hey teachers usally accept a submission even if it a bit late.

Dev C%2b%2b Vending Machine Programme

Dev C%2b%2b Vending Machine ProgramJump to Post

Dev C 2b 2b Vending Machine Programming

Dev C%2b%2b Vending Machine Program

All 11 Replies

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 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.

Vending Machine Meme

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).

Dev C%2b%2b Vending Machine Programmer

Lesson 2:Use funtions (I dont know if you know funtions)

Dev C%2b%2b Vending Machine Programming

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

Comments are closed.