Write a function to compute the nth number of the following series: Given a value x ,
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a function to compute the nth number of the following series: Given a value x , multiply all the non-zero digits of x together and then add that value to x to get the next number in the series. The function should be named: some_series.
1, 2, 4, 8, 16, 22, 26, 38, 62, 74, 102, 104, 108, 116, 122, 126, 138, 162, 174, 202, 206, 218, 234, 258, 338, 410, 414, 430, 442, 474, 586, 826, 922, 958, 1318, 1342, 1366, …
Write a main program that prompts the user to enter “n” and prints out the nth number of the series.
Related Book For
Posted Date: