# Thread: Help with my program..

1. ## Help with my program..

I'm currently working on a program that will ask the user of an amount of money as the input and the program will tell what kind and how many bill and/or coin will be used to form that amount of money. The denominations used are 1000 bill, 500 bill, 200 bill, 100 bill, 50 bill, 20 bill, 10 coin, 5 coin, 1 coin, 25 cents coin, 10 cents coin, 5 cents coin and 1 cent coin.
I have no problems from 1000 bill down to 1 coin but having trouble when I'm already working with the cents. Any tips?

2. Why are cents any different?

3. Originally Posted by tabstop
Why are cents any different?
Because instead of an integer it will already be a float value. What will I do?

Code:
```#include <stdio.h>

int main()
{
int money, a, b, c;

printf("Enter an amount:");
scanf("%d", &money);

if (money >= 1000)
{
a = money / 1000;
b =money % 1000;
printf("%d - One thousand peso bill", a);

if (b != 0)
{
a = b / 500;
c = b % 500;
printf("%d - Five hundred peso bill", a);
}
........and so on..
}

}```
Is there any other way to do it? Tips please

Because instead of an integer it will already be a float value. What will I do?
Do the calculations using cents instead of dollars so you only work with integers.