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 Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...