ProgrammingModerateTCS NQT · Infosys

How many two-digit decimal numbers have digits summing to 9?

  1. A. 4
  2. B. 9
  3. C. 10
  4. D. 5

Correct answer: B. 9

Choosing the tens digit 1..9 fixes the units digit as 9 minus it, giving 18, 27, ..., 81, 90: 9 numbers. 10 wrongly adds 99 (a multiple of 9 whose digits sum to 18), while 5 and 4 count unordered digit pairs instead of numbers, with and without 90.

More C Programming questions

Exams that ask this topic