- Home
- Course Category
- Course Result
- Course Detail
Hot Line: 0124-2383121
Course Introduction
Includes
Certificate & Practice Material
Programs for practice
In the program below, we've introduced beginers to programming in C
Source Code: find factorial of a given number
# This program find factorial of a given number (5! = 5*4*3*2*1) void main() { int a,i,fac; printf("enter a number:"); scanf("%d",&a); fac=1; for(i=a;i>=1;i--) { fac=fac*i; } printf("factorial of a is :%d",fac); }Output
enter a number: 4 factorial of a is 24