| Cristian (1) | |||
|
This is a program to determine the fewest of each money denomination required to make change. I'm stuck in the last part, I can't display correctly, the amount of nickels and pennies. Please help me to fix my problem or if there is a way to improve it. Thanks. Input: Total amount of cents given by an user Output: User's amount of cents converted in change using the fewest of each money denomination. example: 299 cents 2 Dollars 1 Half Dollars 1 Quarter 2 Dimes 4 Pennies
| |||
|
Last edited on
|
|||
| ablya (7) | |
|
C:\c.cpp: In function `int main()': C:\c.cpp:22: warning: converting to `int' from `double' C:\c.cpp:26: warning: converting to `int' from `double' C:\c.cpp:29: warning: converting to `int' from `double' C:\c.cpp:34: warning: converting to `int' from `double' C:\c.cpp:38: warning: converting to `int' from `double' C:\c.cpp:42: warning: converting to `int' from `double' Linking console executable: C:\c.exe Process terminated with status 0 (0 minutes, 0 seconds) 0 errors, 6 warnings pass without " #include "stdafx.h" " | |
|
Last edited on
|
|
| DiptenduDas (90) | |||
|
Hi..., As your code states the Remainder value is always "0".
Please focus into above lines of code. Also if possible give one or two use cases, so that it is easier to analyze. i.e. what is ur input and what are the expected output and current output. | |||
|
|
|||