Program to find Factorial of a given number January 01, 2018 Programing In C No comments #include<conio.h> #include<stdio.h> void main() { int n,i,f; clrscr(); printf("Enter the value of n"); scanf("%d",&n); for(i=0;f=1;i<=n;i++) { f=f*i; } printf("%d",f); getch(); } Output Enter the value of n=4 24 Enter the value of n=5 120 Share This: Facebook Twitter Google+ Stumble Digg Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment