#include<stdio.h>
#include<conio.h>
void main ( )
{
int n, i, f=1;
printf ("Enter number");
scanf("%d",&n);
for (i=n;i>1;i--)
f = f*i;
printf ("\n factorial=%d",i);
getch( );
}
E-notebook
#include<stdio.h>
#include<conio.h>
void main ( )
{
int n, i, f=1;
printf ("Enter number");
scanf("%d",&n);
for (i=n;i>1;i--)
f = f*i;
printf ("\n factorial=%d",i);
getch( );
}
What about 0 dai ?