Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

basic C

Name: Anonymous 2010-11-24 12:17

can you help create a program that will accept an amount and output its denomination.

example

amount: 5670.45

1000: 5
500: 6
200: 0
100: 6
50: 1
20: 1
10: 0
.25: 1
.05: 3

Name: >>12 2010-11-26 14:23

>>13
I don't really know C. "x = 0.05000; x >= 0.05" being false is bullshit, though. Subtracting in a loop might've made more sense to >>1 and I don't know if C has a divmod function.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List