Subscribe For Free Updates!

We'll not spam mate! We promise.

Sunday 26 August 2012

C++ code to Diplaying Factorial of input number



// Diplaying Factorial of a number
// Programmer name: Sohail Ahmed
// Dated: 16/05/2011

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
int num;
int fact=1;
cout<<"\nEnter Any num to find Fact: ";
cin>>num;
for(int i=1; i<=num; num--)
{
fact =fact * num;
}
cout<<"\nFactorial of is: "<<fact;
getch();
}

Socializer Widget By CodingLovers
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment