Write a program that treats a sequence of integers greater than zero. For each number, the program outputs the value that results from eliminating its 0 digits. For example, eliminating 0 digits from 3097601 results in 39761.
The program must implement and use the following RECURSIVE function:
// Pre: x > 0
// Post: returns the value of x without 0 digits
int remove_zeros(int x) {
...
}
Exam score: 2.00 Automatic part: 40.00%
The input is a sequence of integers greater than zero.
For each number, the program outputs the value that results from eliminating its 0 digits.
A non-recursive implementation of the function invalidates the problem.
Author: Pro1
Generation: 2026-01-25T13:28:48.415Z
© Jutge.org, 2006–2026.
https://jutge.org