CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Feb 2011
    Posts
    3

    [RESOLVED] Help with cash register program

    Hello all, I am new here and pretty new to programming as well. I have never posted code before and so I included my source file as an attachment. Basically I have been trying for days now to create a program that asks for the amount of money owed by a customer, and the amount paid, and then prints the total change to give back, as well as the number of dollars and coins of each denomination (i.e $4.66, 4 dollars, 2 quarters, 1 dime, 1 nickel, 1 penny).
    I have reached the point where everything works but the pennies, and I believe it is because of using int values, however if I use doubles or floats I can't use the % division operator.

    Sorry for the long post and thanks in advance for any help, if you need anymore information, or can explain how to post the code, I'll try to respond quickly.

    p.s. I'm coding on a Linux machine, if that makes a difference.
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured