Basic Programs
If Else based Programs
Loop Based Programs
Array Based Programs
String Programs
Function Programs
Pointers Programs
Structure & File Handling Programs
Data Structure Programs
Loop based Programs
C Program to calculate factorial of given number
#include<stdio.h>
#include<conio.h>
int main()
{
int n=0, f=1;
printf("enter the number");
scanf("%d", &n);
while(n>0)
{
f=f*n;
n--;
}
printf("the factorial is %d ", f);
}
Output of the above program is as following.
Video/ C Introduction
Watch video in full size