fact 2(easy)

whats wrong ? i get the answer in my compiler , here it says wrong answer

#include <iostream>
#include<stdio.h>
#include<math.h>

using namespace std;

double fact(int s)
{
    if(s==0)
    {
        double fact=1;
        return fact;
    }
    else
    {
        double y=fact(s-1);
        return (y*(s));
    }
}

int main()
{
    double b[100];
    int a[100],t;
    scanf("%d",&t);
    for(int i=0;i<t;i++)
    {
        scanf("%d",&a[i]);
        b[i]=fact(a[i]);    
    }
    for(int i=0;i<t;i++)
        printf("%f \n",b[i]);
    return 0;
}

dont use double to print instead use long long int as factorial can be a very large number !!

//