In this video tutorial, I've
explained how you can write a C Program for Finding out the Factorial of any
number by using the looping method. Below is the video of Factorial of any
Number in C.
Source
Code:
#include<stdio.h>
#include<conio.h>
void main()
{
long int n, fac=1;
clrscr();
printf("\tEnter an
integer:");
scanf("%ld",&n);
while(n>=1)
{
fac=fac*n;
n--;
}
printf("\tFactorial=%ld",fac);
getch();
}
Plz Share this Video and don't forget to Subscribe to my YouTube Channel !!!
No comments:
Post a Comment