I need a help to find out the problem

Hey guys im getting correct outputs in test cases but ill get an error when submitting
FLOW004

#include

using namespace std;

int main()
{
int t,n,ans;
cin>>t;
while(t>0)
{
cin>>n;
ans = n % 10;
while (n >= 9) {
n /= 10;
}
ans += n;
cout<<ans<<endl;
t–;
}
return 0;
}

Consider the test input:

1
9

consider values till 10 while taking the loop. also its t=t-1;/t–; not t-;