View Single Post
  #2  
Old 08-26-2016, 03:55 AM
naita naita is offline
Guest
 
Join Date: Jun 2002
Location: Norway
Posts: 4,794
If you want to work out such tricks it often helps to do it algebraically for a general case.

Your first example. Say the person is ab years old, that's the same as 10*a + b.

a*5 = 5a (your use of equal signs as "execute" are a deadly sin to a mathematician by the way.)
(5a + 3) *2 = 10a + 6
10a + 6 + b - 6 = 10a + b