The code keeps showing junk value for some reason

#include
#include
using namespace std;
int main()
{
int a,r,og,sum,n=0;
cin>>a;
a = og;

n = (int) log10(a) + 1;

while (og>0)
{
    
	r = og%10;
	og = og/10;

sum = sum + pow(r,n);

}

if (sum==a)
{cout<<"true";}
else {cout<<"false";}
return 0;

}

hello @ramitkapoor

here it should be og=a