You have a function that should return an int, but you are returning nothing.
Also as CommonTater stated your formatting is horrible. Here is one example:
Code:
#include <stdio.h>
int getInput()
{
int changeVal;
printf("Please enter an integer that representd the cents in the customer's change.\n");
printf("Enter the cents amount from the customer's change here: ");
scanf("%d%*c", &changeVal);
return(changeVal);
}
int printChange(int changeVal)
{
if ((changeVal >=5) && (changeVal <=7))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c.\n");
}
else if ((changeVal >=8) && (changeVal <=12))
{
printf("The required change (cents) consists of the following coins:\n1 x 10c");
}
else if ((changeVal >=13) && (changeVal <=17))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n1 x 10c\n");
}
else if ((changeVal >=18) && (changeVal<=22))
{
printf("The required change (cents) consists of the following coins:\n1 x 20c\n");
}
else if ((changeVal >=23) && (changeVal <=27))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n1 x 20c\n");
}
else if ((changeVal >=28) && (changeVal <=32))
{
printf("The required change (cents) consists of the following coins:\n1 x 10c\n1 x 20c\n");
}
else if ((changeVal >=33) && (changeVal<=37))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n1 x 10c\n1 x 20c\n");
}
else if ((changeVal >=38) && (changeVal <=42))
{
printf("The required change (cents) consists of the following coins:\n2 x 20c\n");
}
else if ((changeVal >=43) && (changeVal <=47))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n2 x 20c\n");
}
else if ((changeVal >=48) && (changeVal <=52))
{
printf("The required change (cents) consists of the following coins:\n1 x 50c\n");
}
else if ((changeVal >=53) && (changeVal <=57))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n1 x 50c\n");
}
else if ((changeVal >=58) && (changeVal <=62))
{
printf("The required change (cents) consists of the following coins:\n1 x 10c\n1 x 50c\n");
}
else if ((changeVal >=63) && (changeVal <=67))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n1 x 10c\n1 x 50c\n");
}
else if ((changeVal >= 68) && (changeVal <=72))
{
printf("The required change (cents) consists of the following coins:\n1 x 20c\n1 x 50c");
}
else if ((changeVal >=73) && (changeVal <=77))
{
printf("The required change (cents) consists of the following coins:\n1 x 20c\n1 x 50c");
}
else if ((changeVal >=78) && (changeVal<=82))
{
printf("The required change (cents) consists of the following coins:\n1 x 10c\n1 x 20c\n1 x 50c");
}
else if ((changeVal >=83) && (changeVal <=87))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n1 x 10c\n1 x 20c\n1 x 50c\n");
}
else if ((changeVal >=88) && (changeVal <=92))
{
printf("The required change (cents) consists of the following coins:\n2 x 20c\n1 x 50c\n");
}
else if ((changeVal >=93) && (changeVal <=95))
{
printf("The required change (cents) consists of the following coins:\n1 x 5c\n2 x 20c\n1 x 50c\n");
}
return(); /// You should be returning something here.
}
int main()
{
int changeVal;
changeVal = getInput();
return(0);
}
Jim