I am wandering around for answers. But I end up that my code is correct ( I'm 90% sure :P )
#include <cs50.h>
#include <stdio.h>
int main(void)
{
double change;
do
{
printf("What do i owe you ?\n");
change = get_double();
}
while (change < 0 );
int times=0;
while (change > 0.24){
change = change - 0.25;
times++;
}
while (change > 0.09){
change = change - 0.10;
times++;
}
while (change > 0.04){
change = change - 0.05;
times++;
}
while (change > 0.0){
change = change - 0.01;
times++;
}
printf("%d\n" , times);
}
That's my code, but when checking i keep on taking wrong values when asking for 1.6 and 4.2 .