Our Recommendation for You Search your Query, You can find easily. for example search by book name or course name or any other which is related to your education

Followers

how to find the factorial of a number using c++



This the source code to find the factorial of a number
#include<iostream.h>
main()
{
      int factorial,number;
      factorial=1;
      number=1;
     cout<<"please enter the number for factorial";
     cin>>number;
    while(number>1)
{
factorial=factorial*number;
number=number-1;
}
cout<<"the factorial is<<factorial;
getch();
}


OUR SUGESSTION YOU SHOULD VISIT