Ein komplett neuer Lösungsansatz:
Code:
int x = 12345;
int y = x % 10; //= 5
x /= 10; //x = 1234
y = x % 10; //= 4
x /= 10; //x = 123
y = x % 10; //= 3