why cannot we use while loop here.why do while loop is giving correct ans.
#include
using namespace std;
int main() {
long long int i;
cin>>i;
if(i<0 || i>1000000000000)
{
return 1;
}
long long int power=1;
long long int j=0;
int rem;
while(i!=0)
{
rem=i%10;
i=i/10;
if(rem==0)
{
rem=5;
}
j=j+rempower;
power=power10;
}
cout<<j;
return 0;
}