/*Program for evaluation of the factorial of a given integer */ main() { int a,b; clrscr(); printf("\n\t\tThis program will help you to evaluate the factorial"); printf("\n\t\t value of a given integer."); printf("\n\n\t\t Enter the number for factorial evaluation : \n\t\t\t\t\t"); scanf("%d",&a); b=fact(a); printf("\n\n\n\t\t The factorial of the given number is : %d.",b); getch(); } /* Function : */ fact(long int p) { int i,j=1; for(i=p;i>0;i--) j=j*i; return(j); }