Solution of the problem
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n=1005;
int ans=n;
int p=1;
while(n)
{
if(n%10==0)
{
ans=ans+p*5;
}
n/=10;
p=p*10;
}
cout<<ans;
return 0;
}
Top comments (0)