Write a c program to find out factorial of a number - CodeTextPro | Free Web Tutorial

Codetextpro Provides free Web tutorial, HTML, CSS, C, C++, Java, JavaScript, PHP, MySql, Python, Program, Programming Notes, Programming Questions and more.

Programming

Saturday, January 5, 2019

Write a c program to find out factorial of a number

Find out factorial of a number

#include<stdio.h>
#include<conio.h>
main()
{
int i,fact=1,n;
printf("please enter the value");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
fact=fact*i;
}
printf("value of fact %d is %d",n,fact);
getch();
}

No comments:

Post a Comment