I havent finished the whole, just the dollar part. But the formulation cannot be run correctly Can anyone tell me which part is incorrect?
Floating point cannot accurately represent values like
int conversion truncates the value (rounds towards zero), you might want to use
math.h or something like that.
You might have meant
dollar = (change - change % 100) / 100;, which could be just
dollar = change / 100; since integer division also truncates.
Also, you probably meant
>0 instead of
>=0. That whole
if is not really required.