Purpose of this blog is to make programming easy , weak programmers may get help from my blog i tried my best to post some of my codes in form of easiest approach, I think this blog is perfect c++ guide in form of online blog. please consult my all codes and suggest all of it with your class mates. Share experiences & knowledge with your juniors. Make yourself habitual to write different programs for 2 hours a day daily.
Sunday, 24 March 2013
C++ Factorial Simple Program
#include<iostream> #include<conio.h> using namespace std; void main() { int fact; int result= 1; cout<<"Enter Number to find Factorial = "; cin>>fact; int i=fact; //i = 5 for(int i=fact;i>1;i--) { fact = fact * (i-1); cout<<fact<<","; } _getch(); }