Sunday, 6 May 2018

Program To Find Factorial Of Any Number in " C" Language

/* factorial of a number */
# include <stdio.h>
void main ()
{
int n ;
fact = 1;
clrscr () ;
printf ("\n enter a number:") ;
scanf ("%d", & n) ;
while ( a!=0 )
{
fact = fact*a ;
a-- ;
}
printf ("\n factorial of %d =%d", n,fact) ;
getch () ;
}

No comments:

Post a Comment

Featured post

Program to find maximum of three number using user define function in C++

A function can be define by the user as per the requirement of the user or programmer . To implement a user define function , a programmer ...