It's far more readable than what you posted.Well it's still heaps slower than the way I posted, but if you want to use it you can improve it a bit by changing;
Code:a = (num / 100 ) % 10; //a = 2;
to;
Code:a = (num / 100 ); //a = 2;
The first way works if there is more than 3 digits eg. 4255. It's a common way of doing it. But yes, if there is only 3 digits, the second way works.
Last edited: