Wednesday, 9 November 2016

THIS IS A PROGRAM TO FIND FACTORIAL


#include<stdio.h>
#include<conio.h>
void main()
{
int i,fact=1,a;
printf("please enter a number to find its factorial\n");
scanf("%d",&a);
for(i=1;i<=a;i++)
{
fact=fact*i;
}
printf("factorial of %d is %d",a,fact);
getch();
}


नितिन मुकेश  के द्वारा प्रकाशित 

No comments:

Post a Comment