- Write A Function Reduce N The Function Gets A Positive Number N As Parameter The Function Returns A Positive Integer N 1 (42.56 KiB) Viewed 22 times
Write a function reduce(n) The function gets a positive number n as parameter. The function returns a positive integer n
-
- Site Admin
- Posts: 899603
- 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
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