The program to replace all 0’s with 1 in a given integer is discussed here. Given an integer as an input, all the 0’s in the number has to be replaced with 1.
For example, consider the following number
Input: 102405
Output: 112415
Input: 56004
Output: 56114
The program to replace all 0’s with 1 in a given integer is given below.
@@coding::1@@
Time complexity:O(n)
Recommended Programs