Computer Science, asked by saurabhvaidya474, 1 month ago

write afor a given input number we need find all such numbers whose sum including itself and the sum of it's digit is equal

Answers

Answered by sanjeevaraya3
0

Answer:

Explanation:

Input:  n = 2, sum = 2

Output: 2

Explanation: Numbers are 11 and 20

Input:  n = 2, sum = 5

Output: 5

Explanation: Numbers are 14, 23, 32, 41 and 50

Input:  n = 3, sum = 6

Output: 21 i think so

Answered by itzbangtanarmy7
1

Answer:

For example, the sum of the digits for 786 is 7+8+6=21 and the sum of the digits for 21 is 3 so the digit sum of 786 is 3.

Similar questions