When I take the user input in dollars (as a float) and multiply it by 100 -- even when I then save that value as an intermediate float "cents" before changing it to an integer, for some reason the output makes the user input value into an integer before multiplying it by 100 to change into cents.
For example, on user input 3.87, the output is 300 cents, or 12 coins, instead of 387 cents and 18 coins.
My (relevant) code is as follows:
float cents = (100 * get_change());
int c = round(cents);
...
int get_change(void)
{
float d;
do
{
d = get_float("Change Owed (in dollars): \n");
}
while (d < 0);
return d;
}