Respuesta :

Answer:

void main()

{

int n, i, fact=1;

printf(""Enter the number\n"");

scanf(""%d"",&n);

i=num

while(i>=1)

{

fact=fact * i;

i--;

}

printf(""The factorial of given number %d is %d\n"", n, fact);

return 0;

}

Explanation:

This program obtains the number for which the factorial has to be found.

Then run a for loop till the factor of 1 is calculated and inside the for loop the number is multiplied with other numbers in the descending order and finally result is printed.