PROGRAM TO PRINT FACTORIAL OF A NUMBER


#include <stdio.h>
#include <conio.h>

void main()
{
long int i,a,f=1;
clrscr();

printf("enter value of a");
scanf("%ld",a);

for(i=1;i<a;i++)
{
f=f*i;
}
printf("factorial is %ld",f);
getch();
}

SIMPLE PROGRAMS
FUNCTIONS


NUMBERS


STRINGS AND CHARACTERS

Comments