using namespace std;

int main()

{

```
int n;
cout << "Number of times the operation will run " << endl;
cin >> n;
for (int i = 0; i < n; i++)
{
int num;
cout << "Enter the number" << endl;
cin >> num;
int rem = (num % 10);
if(num > 9)
{
while (num >= 10)
{
num = num / 10;
while (num > 0 && num < 9)
{
int add;
add = (num + rem);
cout << add << endl;
break;
}
}
}
else
{while (num > 0 && num <= 9)
{
cout << (num + num%10) << endl;
break;
}
}
}
return 0;
```

}