Header Ads

Learn Together, Stay Connected.

ফ্যাক্টোরিয়াল-C


#include<stdio.h>
#include<math.h>
int fact(int n)
{
if(n<2)
return 1;
else
return(fact(n-1)*n);
}
int main()
{
int N;
scanf("%d",&N);
printf("%d",fact(N));
return 0;
}

No comments

Theme images by Dizzo. Powered by Blogger.