IDNLearn.com makes it easy to find the right answers to your questions. Find reliable solutions to your questions quickly and accurately with help from our dedicated community of experts.
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 presence here. Keep sharing knowledge and helping others find the answers they need. This community is the perfect place to learn together. Find clear and concise answers at IDNLearn.com. Thanks for stopping by, and come back for more dependable solutions.