long unsigned int n;
long unsigned int a,b,c;
long unsigned int sum=a+b+c;
if i start with the coin with 24 written:
i split it into 12, 8 and 6 (at this stage, total = 26)
but, i can split the coin 12 into 6, 4 and 3. (this gives a total of 27 = (6+4+3 + 8 + 6))
so, i can get total value of 27.
but, your code prints it as 26.
this example should help you find more about it.
thanks a lot!