factorial number

/*except one no from user and display its factorial*/

#include
#include

void main()
{
int no,i,fact=1;
clrscr();
printf("\n Enter The No :- ");
scanf("%d",&no);
for(i=no;i>=1;i--)
{
fact=fact*i;
}
printf("\n factorial of this number is :- %d",fact);
getch();
}

1 comments:

hemant said...
This comment has been removed by the author.

Post a Comment