Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the coding of display the factorial of a number
using array and function?

Answer Posted / balaji ganesh

#include<stdio.h>
int fact(int m)
{
int i,f=1;
for(i=m;i>0;i--)
f=f*m--;
return f;
}
void main()
{
int n,s;
clrscr();
scanf("%d",&n,printf("enter the number:"));
s=fact(n);
printf("factorial of %d is=%d",n,s);
getch();
}

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c mainly used for?

1120


How does pointer work in c?

1200


What are local static variables? How can you use them?

1206


What Is The Difference Between Null And Void Pointer?

1336


What is string in c language?

1251


What is a char c?

1089


What are register variables? What are the advantage of using register variables?

1236


What is build process in c?

1206


Why isn't any of this standardized in c? Any real program has to do some of these things.

1266


What is the difference between formatted&unformatted i/o functions?

1111


What is a pointer on a pointer in c programming language?

1191


What does p mean in physics?

1098


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2845


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

1169


What is the use of sizeof () in c?

1100