Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  fact
Language: C/C++
Code:
#include <stdio.h>
int main()
{
int i,n;
long fact=1;
printf("enter the value of n");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
fact=fact*i;
}
printf("factorial is %ldn",fact);
return 0;
}
          
          
Comments: