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

CodeTextPro.com Provides - Web design, Technology gyan, Digital marketing, Online earnings, Seo, Adsense, Technology news, Motivation and inspiration, Latest Technology Affairs, Gadgets, Blogging

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