in devC++ compiler code is working fine but in this online Compiler some random number is added to my output
my code is
#include
#include<bits/stdc++.h>
using namespace std;
int n,rem,rev;
int arr[50];
main()
{
cin>>n;
while(n!=0)
{
rem=n%8;
n=n/8;
rev=rev10+rem;
}
cout<<rev<<endl;
int n2,rev2;
while(rev!=0)
{
n2=rev%10;
rev=rev/10;
rev2=rev210+n2;
}
cout<<rev2;
}