**Question: **Consider a number 235, where last digit is the sum of first two digits i.e. 2 + 3 = 5. How many such 3-digit numbers are there?

**Answer:**

There are 45 different 3-digit numbers.

The last digit can not be 0.

If the last digit is 1, the only possible number is 101. (Note that 011 is not a 3-digit number)

If the last digit is 2, the possible numbers are 202 and 112.

If the last digit is 3, the possible numbers are 303, 213 and 123.

If the last digit is 4, the possible numbers are 404, 314, 224 and 134.

If the last digit is 5, the possible numbers are 505, 415, 325, 235 and 145.

Note the pattern here - If the last digit is 1, there is only one number. If the last digit is 2, there are two numbers. If the last digit is 3, there are three numbers. If the last digit is 4, there are four numbers. If the last digit is 5, there are five numbers. And so on.....

Thus, total numbers are

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45

Altogether then, there are 45 different 3-digit numbers, where last digit is the sum of first two digits.