:( input of 4.2 yields output of 18
\ expected output, but not "22\n"
I believe I have used the roundf()
correctly when converting dollars to cents, but it still gives 22 coins total, instead of 18, when the user inputs 4.2 as the change owed.
Yet, it handles any other x.2 input correctly. I used the ternary operator, instead of a while loop, for each coin type when calculating how many of each coin to use. Does that matter? Please help! thank you