i dont understand code please help with code can you explain code properly
I dont understand code please help with code
hi @preetitakhar960_7ecbeb56682325a0
take a string input and iterate replace every 0 with 5, simple
#include<bits/stdc++.h>
using namespace std;
int main() {
string s;
cin>>s;
int n = s.length();
for(int i=0;i<n;i++){
if(s[i] == '0')s[i] = '5';
}
cout<<s<<endl;
}