Whats wrong in this code?

#include
using namespace std;

int t,n[1000];
void input(int);
void output(int);

int main()
{

    cin>>t;
    input(t);
    output(t);

    return 0;
}

void input(int t)
{

    {
        for (int i=0; i<t;i++)
            cin>>n[i];
    }
}

void output(int t)
{
    int temp=0, ans;
    int i=0;

    {
        for (i=0; i<t ; i++)
        {

            temp = n[i];
            ans=0;
            while (temp>=1 && temp<=100000)
            {
                int r=temp%10 ;
                ans=(ans*10) + r;
                temp=temp/10 ;
            }
            cout << ans <<endl;
        }
    }
}

Question code?

which question are u trying to solve?

 while (temp>=1 && temp<=100000)

Make it while(temp>=1)

There is a problem with test cases. The external setter didnt has made cases where N>100000. Will notify it to @admin for fixing.

He is solving Question FLOW007

accepted after while(temp>=1).

Thanks