Bytelandian gold coins

Hey people!!
I am a new member to competitive coding family, and was solving a practice problem as I have named in title. I am getting accurate output but its giving a wrong answer.
please anyone help me.
I have pasted the code below.

#include
using namespace std;
int main()
{
int t;
try{
cin>>t;
if(t>=10)
throw t;
}
catch(int x)
{

}

int n;
int coins;
for(int i=0;i<t;i++)
{
    cin>>n;
    int a,b,c;
    a=n/2;
    b=n/3;
    c=n/4;

    if(a>=1 && b >=1 && c >=1)
    {
        coins=a+b+c;
    }
    else{

        coins = n;
    }
    cout<<coins;
}

}

is the code comprehendable? check for yourself