EDIT: Here's the updated code:
#include <cs50.h>
#include <math.h>
#include <stdio.h>
int main (void)
{
int changetwentyfive = 0;
int changeten = 0;
int changefive = 0;
int changeone = 0;
int changeamount = 0;
printf("Amount to be converted to change: ");
float changefloat = GetFloat();
if (changefloat < 0)
{
do
{
printf("Amount to be converted to change: ");
changefloat = GetFloat();
}
while(changefloat < 0);
}
int change = changefloat * 100;
for (changeamount = changeamount - 1 + 1; change >= 25; changeamount++)
{
change = change - 25;
changetwentyfive++;
}
for (changeamount = changeamount - 1 + 1; change >= 10; changeamount++)
{
change = change - 10;
changeten++;
}
for (changeamount = changeamount - 1 + 1; change >= 5; changeamount++)
{
change = change - 5;
changefive++;
}
for (changeamount = changeamount - 1 + 1; change >= 1; changeamount++)
{
change = change - 1;
changeone++;
}
printf("%d\n", changeamount);
printf("25: %d, 10: %d, 5: %d, 1: %d", changetwentyfive, changeten, changefive, changeone);
}
Hope you can help me.