how many 3 - digit numbers abc , in which a , b , and c are each digits , satisfy the equation 2 b = a + c ?
possible solutions are diff of 0 - - 111222 , . . . . . . . . , 999 = 9 diff of 1 - - 123 , 234 , . . . . . , 789 = 7 x 2 = 14 diff of 2 - - 135 , 246 . . . . . . . 579 = 5 x 2 = 10 diff of 3 - - 147 , 258369 = 3 x 2 = 6 diff of 4 - - 159 = 1 x 2 = 2 last 210 , 420 , 630840 = 4 so total is 9 + 14 + 10 + 6 + 2 + 4 = 45 . answer : d
add(add(multiply(3, const_12), multiply(2, const_4)), const_1)