Write a function reduce(n) The function gets a positive number n as parameter. The function returns a positive integer n
Posted: Tue May 24, 2022 8:42 am
question should be in the same file.
Write a function reduce(n) The function gets a positive number n as parameter. The function returns a positive integer number with all digits of n, in the same order (right to left), without repeating digits. Requirements: Using strings is not allowed. Examples: n output 1569 1569 1556669999 1569 22133212310 2310 867767776266644 87264 Part B: Write a program that gets a positive integer from the user. The program displays the result of reduce (n) by calling the function. Notes: • Both parts of the