Friday, 4 May 2018

Program to find factorial of 5 in c language

/* calculate factorial of 5 */
# include <stdio.h>
void main ()
{
int a = 5 ;
int fact = 1 ;
clrscr () ;
while (a!=0)
{
fact = fact*5 ;
a-- ;
}
printf ("\n factorial of 5=%d",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...