Script Viewer
C
Example 3
Download
Save Modified
/*Find factorial number using function*/ #include
main() { int a,f; printf("Enter a Number: "); scanf("%d",&a); f=fct(a); printf("The %d Factorial Number is: %d",a,f); getch(); } int fct(int n) { if(n==0) return 1; else return(n*fct(n-1)); }