Replace them all (functions q)

#include
using namespace std;

int calculatedvalue(int n)
{
int digitplace=1;
int result=0;
if(n==0)
{
result=+(5digitplace);
}
while(n>0)
{
int rem = n%10;
if(rem==0)
{
result+=(5
digitplace);
}
digitplace*=10;
n=n/10;
}
return result;
}

int convert0to5(int num)
{
return num+calculatedvalue(num);
}
int main() {
int n;
cin>>n;
cout<<convert0to5(n);
return 0;
}

this is my code and i am not getting all the test cases right plzz help me with it.

Hi,
just take input in form of string and it would become very easy to implement…
refer this https://ide.codingblocks.com/s/625606

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.