The code is working in sublime + PowerShell but here it is not giving any output
Code is:
#include
#include
using namespace std;
int main()
{
int input,ans,i=0;
cin>>input;
ans=0;
while(input!=0)
{
ans=input%8+ans*10;
if(input%8==0)
i++;
else
{
ans*=pow(10,i);
i=0;
}
input/=8;
}
cout<<ans;
return 0;
}