please help me with this factorial problem

i check every input. Its giving the output but the judge says “wrong answer”. Whats wrong with it?

#include <stdio.h>
#include <stdlib.h>
#include<math.h>
int power(int);
int main()
{  int t,n,q;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d",&n);
        int powerv=power(n);

         int powsum=0;
        for(q=1;q<powerv;++q)
        {
            float f=n/pow(5,q);

           powsum=powsum + floor(f);

        }
        printf("%d\n",powsum);

    }
    return 0;
}
int power(int n)
{
    int i;
    for(i=0;i<n;i++)
    {
        if(pow(5,i)>n)
            break;
    }
    return i;
}

Dude… your program returns factorial of big numbers in scientific exponential format. But they ask for the complete number without any changes or magnitude.

1 Like

i didnt get u. Mind explaining a bit?

You can calculate factorial of large numbers, even 100! using array and elementary multiplication technique learned in school. For explanation see this link. Hope this might help.

dude plz explain your moto what do u want from this program

//