Program
code
#include
<stdio.h>
#include
<conio.h>
void
main()
{
long
int question, factorial=1, i;
clrscr();
printf(“Please
input an integer to get its factorial.\n”);
scanf(“%ld”,&question);
for (i=question;i>=1;i--)
factorial=factorial*i;
printf(“The
factorial of %ld is %ld.\n”,question,factorial);
getch();
}
Example
of output
Please
input an integer to get its factorial.
13
The
factorial of 13 is 1932053504.