Write a function reduce(n) The function gets a positive number n as parameter. The function returns a positive integer n
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a function reduce(n) The function gets a positive number n as parameter. The function returns a positive integer n
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 question should be in the same file.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!