Answer:
n! = n*(n-1)*(n-2)*(n-3)* ... *2*1
Explanation:
The factorial operator is simply a mathematical expression of the product of a stated integer and all integers below that number down to 1. Consider these following examples:
4! = 4 * 3 * 2 * 1
4! = 12 * 2 * 1
4! = 24
6! = 6 * 5 * 4 * 3 * 2 * 1
6! = 30 * 4 * 3 * 2 * 1
6! = 120 * 3 * 2 * 1
6! = 360 * 2 * 1
6! = 720
So, the factorial of n would follow the same as such:
n! = n * (n-1) * (n-2) * ... * 2 * 1
Cheers.
Answer:
Data is the correct answer
Answer:
#include <bits/stdc++.h>
using namespace std;
int main() {
string in;//string in for taking input...
cout<<"Do you want to continue ?"<<endl;
getline(cin,in);//taking input from the user...
if(in=="y"||in=="Y"||in=="yes"||in=="OK"||in=="Why not?")//conditions..
cout<<"OK"<<endl;
else if(in=="No")
cout<<"terminating"<<endl;
else
cout<<"Bad input"<<endl;
return 0;
}
Explanation:
I have taken a string in.
Then taking input from user.
Checking the conditions using if else if ladder.
1. Requirements gathering/analysis.
2. Design.
3. Development.
4. Testing.
5. Maintenance.