Hi, I Am Trying To Do The Small Factorial In C++.
Could someone help by telling what is wrong with this code (CodeChef didn’t accept it):
#include
using namespace std;
int main() {
int Test_Cases, Text_Number, The_Answer;
cin >> Test_Cases;
for (int i = 0; i < Test_Cases; i++)
{
cin >> Text_Number;
The_Answer = 1;
for (int k = 1; k < (Text_Number + 1); k++)
{
The_Answer *= k;
}
cout << The_Answer << endl;
}
return 0;
}