Monday, 30 March 2015

how to find of the factorial of any number in C++

TO Find The Factorial Of Any Number;


#include<iostream.h>#include<conio.h>void main(){int n,num,factorial=1;cout<<"enter number to find its factorial";cin>>num;for(n=1;n<=num;n++){factorial=factorial*n;}cout<<”factorial of given number” “="<<factorial<<endl;getch();}







No comments: