Program to find "Factorial value".

Program code for factorial without recursion :


#include<stdio.h>
#include<conio.h>
void main()
    {
int i,f=1,n;
clrscr();
printf("\nEnter a value: \n");
scanf("%d",&n);
for(i=1;i<=n;i++)
  {
f=f*i;
  }
printf("Factorial value = %d",f);
getch();
    }

Comments

Popular posts from this blog

Components of C language

Decision making using if statement

How to make payment for final certificate, migration, provisional for the students of last semester of ptu?