In this, we are going to see for loop, the program is for finding factorial of number with the help of the C Programming language.Â
#include <stdio.h>
int main()
{
long long int i, n, fact;
fact = 1;
printf("Enter the value of n:-\n");
scanf("%lld", &n);
for (i = 1; i <= n; i++)
{
fact = fact * i;
}
printf("Factorial of the given number is:- %lld", fact);
return 0;
}
//......Coded by YASH ALAPURIA
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP