There is the problem given on the https://www.spoj.pl/problems/FCTRL2/

and I'm submitting a solution for the problem but it's responding
wrong answer. I don't know why?

Submitted Solution:

#include<iostream>
using namespace std;

int Factorial(int M);
int main()
{
        int j,t,n;
        cin>>t;
        for(j=0 ; j < t; j++)
        cin>>n;
        Factorial(n);
}

int Factorial(int M)
{
        int i,factorial=1;
        for(i=1 ; i<=M; i++)
        {
                factorial=factorial*i;
        }
        return factorial;
}

Thanx in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to