WA in SWPDGT

Why I am getting WA in SWPDGT. Please Help.
solution link:CodeChef: Practical coding for everyone
My code:

#include<bits/stdc++.h>

using namespace std;

#define endl “\n”

int main()
{

long long t, i;
cin >> t;
while(t--)
{

    int a, b, m, n, p, q, x, y;
    for(i=1;i<100;i++)
    {
        for(int j=1; j<100; j++)
    {
        a=i;b=j;
        cout << a<< " " << b << endl;
        m=a/10;
    n=b/10;
    p=a%10;
    q=b%10;
    if(a==b)
    {
        cout << a+b << endl;
    }
    else if(a/10==0 && b/10==0)
    {
        cout << a+b << endl;
    }
    else if(a%10==0 && b%10==0)
        cout << a+b << endl;
    else if (a/10==0 && b/10!=0)
    {
        if(n<a)
        cout<< a*10+n+q << endl;
        else
            cout << a+b << endl;
    }
    else if (a/10!=0 && b/10==0)
    {
        if(m<b)
        cout<< b*10+m+p<< endl;
        else
            cout << a+b << endl;
    }
    else if(a/10!=0 && b/10!=0)
    {
        x=m*10+p*10+n+q;
        y=q*10+n*10+p+m;
        if(x>y)
            cout << x << endl;
        else
            cout << y<< endl;
    }
    }

}
}

}