I'm having trouble getting the the modulo function to work in greedy using this code
int result = 0.0;
printf("SHOW ME WHAT YOU GOT: ");
float paid = GetFloat();
while (paid >= 0.25)
{
result = (paid/0.25) - (paid % 0.25);
paid = paid - 0.25;
}
while (paid >= 0.10 && paid < 0.25)
{
result = (paid/0.10) - (paid % 0.10);
paid = paid - 0.10;
}
The error says that 'invalid operands to binary expression ('double' and 'double'). How do I fix this?