int main (void)
{
int a, b, c, d;
int n;
int temp;

do
{
printf("Enter a five-digit number < -1 to end >: ");
scanf(" %d", &n); // if you are going to ask the user for input over...