Help me in solving FLOW007 problem

My issue

My code

// We have populated the solutions for the 10 easiest problems for your support.
// Click on the SUBMIT button to make a submission to this problem.

#include<iostream>
using namespace std;
int main(){
    int t,a;
    cin>>t;
    for(int i=1;i<t+1;i++){
        cin>>a;
        while(a>0){
        int d=a%10;
        if(d>0){
            cout<<d;
        }
        a=a/10;
    }
    cout<<endl;
    }
    return 0;
}

Problem Link: FLOW007 Problem - CodeChef

@goyalsajal92
your code will print for test case n=2300 as 0032 instead of 32 only;