Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

I need help with cash register program

molarmolar Posts: 1Member
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

Comments

  • ManningManning Posts: 1,621Member
    : 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.

  • Sand_Hawk9Sand_Hawk9 Posts: 233Member
    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.


Sign In or Register to comment.