I saw a question like this relating to Java and C, but I am using LUA. The answers might have applied to me, but I wasn't understanding them.
Could someone please tell me how I would get the sum of the individual digits of an Integer. For Example.
a = 275
aSum = 2+7+5
If you could explain how I would achieve this in LUA and why the code does what it does, that would be greatly appreciated.