Discover the answers you need at Westonci.ca, where experts provide clear and concise information on various topics. Explore our Q&A platform to find in-depth answers from a wide range of experts in different fields. Experience the convenience of finding accurate answers to your questions from knowledgeable experts on our platform.
Sagot :
Answer:
I'm not gonna use recursion for this program.
#include <iostream>
using namespace std;
int main()
{
int input,factorial=1;
cout<<"Enter a number to get it's factorial: ";
cin>>input;
for(int i=1;i<=input;i++)
{
factorial *=i;
}
cout<<"The factorial of the number you entered is: "<<factorial;
return 0;
}
#include
using namespace std;
int main() {
int num,factorial=1;
cout<<" Enter Number To Find Its Factorial: ";
cin>>num;
for (int a=1;a<=num;a++) {
factorial=factorial*a;
}
cout<<"Factorial of Given Number is ="< return 0;
}
using namespace std;
int main() {
int num,factorial=1;
cout<<" Enter Number To Find Its Factorial: ";
cin>>num;
for (int a=1;a<=num;a++) {
factorial=factorial*a;
}
cout<<"Factorial of Given Number is ="< return 0;
}
Thanks for stopping by. We are committed to providing the best answers for all your questions. See you again soon. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. Thank you for visiting Westonci.ca. Stay informed by coming back for more detailed answers.