void main (void){

int num,x;

void factorial(int);

printf("Please enter an integer: ");

scanf("%d", &num);

fflush(stdin);

for(x=1; x<num; x++) /* A */

factorial (x);

}

void factorial (int x){

printf("x = %d\n", x);

At A it looks like you are going to be calculating separate factorials for each x from 1 to num. So for 1 you get 1, for 2 you get 2, for 3 you get 6 for 4 you get 24 etc. Is that what you want?

The factorial function itself needs to multiply all the numbers from itself down to 1. So a loop is indicated:

for(i=x; i>=1; --i)

{ ...

}

So inside this loop you should have a variable that you successively multiply by i to get the factorial of x.