PROGRAM TO FIND THE FACTORIAL OF A NUMBER USING FOR LOOP
/* PROGRAM TO FIND THE FACTORIAL OF A NUMBER USING FOR LOOP */ #include<stdio.h> #include<conio.h> void main() { int n,i,fact=1; clrscr(); printf(“\n\nENTER THE VALUE OF N :”); scanf(“%d”,&n); for(i=1;i<=n;i++) { fact=fact*i; } printf(“\n\nTHE FACTORIAL OF N IS : %d”,fact); getch(); }
Continue Reading