Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4106
Number of posts: 14016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
I need help with cash register program Posted by molar on 28 Oct 2001 at 3:45 PM
For a school project I need to write a cash register program to ask for the amount tendered by the customer as well as the price, and tax. It outputs the price, the tax, the amount tendered, and the change due. It tells the cashier the correct combination of bills and coins eaual to the change due. HELP

Report
Re: I need help with cash register program Posted by Manning on 28 Oct 2001 at 5:32 PM
: For a school project I need to write a cash register program to ask for the amount tendered by the customer as well as the price, and tax. It outputs the price, the tax, the amount tendered, and the change due. It tells the cashier the correct combination of bills and coins eaual to the change due. HELP
:

This board is meant to help people who have questions or specific problems with Pascal, and not for you to have your school work done for you. So please go and try to write the program yourself, and if you run into any problems come back with a new question then.

Report
Re: I need help with cash register program Posted by Sand_Hawk9 on 7 Nov 2001 at 5:28 AM
I can give you one little trick! Make an array wich keeps for every bill/coin what the amount is. ie. 10 bill, 5 bill, 1 bill, .50 coin and .10 coin. 10bill is array[0], 5bil is array[1] enz enz. Now take the amount of money and see if it's bigger than the largest bill. ie 12.50 > 10 = TRUE. If it's true decrease the amount by 10 and array[0] = array[0] + 1. Put it inside a loop and you got the way to give the right bills back. Simple, right?

Sand Hawk

- Earth is 98% full. Please delete anybody you can.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.