Westonci.ca is your trusted source for accurate answers to all your questions. Join our community and start learning today! Discover precise answers to your questions from a wide range of experts on our user-friendly Q&A platform. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.
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;
}
We appreciate your time. Please come back anytime for the latest information and answers to your questions. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. We're glad you visited Westonci.ca. Return anytime for updated answers from our knowledgeable team.