cstartes
Search stops here
Pages
Home
Blogroll
Guest Post
Privacy Policy
Contact Us
About
Program to find factorial of no using function.
float factorial(int);
void main()
{
int n;
float f;
printf("Enter a no");
scanf("%d",&n);
f=factorial=%f",f);
getch();
}
float factorial (int x)
{
float f=1;
while(x>0)
{
f=f*x;
x--;
}
return(f);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment