A (very) slow solution :-D :
int TakeByIndex(int iTest, int iIndex)
{
return (iTest % pow(10, iIndex + 1)) / pow(10, iIndex);
}
bool IsDivisibleBy11(int iTest)
{
int a = 1,
k = 1,
i = 0,
s = 0;
while (k && a) {
a = TakeByIndex(iTest, i++);
k = TakeByIndex(iTest, i++);
s += (a - k);
}
return (0 == s % 11);
}