Saturday, 24 December 2016

//THIS IS MY FIRST AND EASIEST PROGRAM PROGRAM
//FACTORIAL OF SMALL NUMBER

#include<stdio.h>
#include<conio.h>
int main()
{
int fact=1,no,i;    //
printf("enter the no");
scanf("%d",&no);
for(i=no;i>=1;i--)
{
fact=fact*i;
}
printf("fact is %d",fact);
getch();


}

No comments:

Post a Comment