WRITE A C PROGRAM TO FIND FACTORIAL OF A NUMBER - C C++ Java Programs - Examples

Latest

C C++ Java Python Perl Programs Examples with Output -useful for Schools & College Students

Sunday, October 30, 2011

WRITE A C PROGRAM TO FIND FACTORIAL OF A NUMBER


WRITE A PROGRAM TO FIND FACTORIAL OF A NUMBER

#include<stdio.h>
#include<conio.h>
void main()
{
int a,i.fact=1;
clrscr();
printf(“Enter the number \n”);
scanf(“%d%”,&a);
for(i=1;i<=a;i++)
{
fact=fact*i;
}
printf(“the factorial is %d”,fact);
getch();

}

No comments:

Post a Comment