# C program to find the factorial of a number using non-recursive function

Updated on May 14, 2011

## What is factorial of a number?

Factorial of a number is nothing but the result of the multiplication of the numbers before it. For instance factorial of 4 is 1*2*3*4=24

## Program for factorial of anumber using non recursive function

/* By RAKESH AKUTHOTA */

#include<stdio.h>

#include<conio.h>

void main()

{

int n,f;

clrscr();

printf("enter a number");

scanf("%d",&n);

f=factorial(n);

printf("the factorial of the number %d is %d",n,f);

getch();

}

int factorial(int num)

{

int fact=1,i;

{

for(i=1;i<=num;i++)

{

fact=(fact*i);

}

}

return(fact);

}

## Recommended books

I am Rakesh Kumar Akuthota studying B.tech (IT) first year at Sree Dattha Institute Of Engineering And Science, Ibrahimpatnam, Hyderabade, Andhra Pradesh, India. I have made these posts in order to help some or the other who are interested in learning c language and at the same time to make some money online inorder to satisfy me dreams of doing an MBA from London or Australia. I love making friends online. If you want me to be a friend of yours then please do send a request at facebook. I also blog at flixya and dollardreams and 14sms

I really want to get your suggestions in the form of comments and they will boost me up. Please leave your valuable fedback and suggestion in the form of comments.

Click edit above to add content to this empty capsule.

0

0

0

292

163

2

5

9