It will be done by find remainder and if I find 0 then replace with the help of string
Replace them all
hi @kumarakash121005
u can directly take the input in the form of a string and then run a loop and check if digit at i th position is 0 then make it …
refer this -->
#include <iostream>
using namespace std;
int main() {
string str;
cin>>str;
for(int i=0;i<str.size();i++){
if(str[i] == '0'){
str[i] = '5';
}
}
cout<<str<<endl;
}
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

what is wrong in my code
in if loop add n/=10
then i think it will be working fine