#include<stdio.h> #include<conio.h> int fact(int); void main() { int x,n; printf("nEnter the value of n :"); scanf("%d",&n); x=fact(n); printf("n%d",x); getch(); } int fact(int n) { if(n==0) return(1); return(n*fact(n-1)); }
Next
« Prev Post
« Prev Post
Previous
Next Post »
Next Post »
Subscribe to:
Post Comments (Atom)