incorrect output

#include<math.h>
using namespace std;
int main()
{
int n;
cout<<“enter the number”<<endl;
cin>>n;
int count=0;
while(n>0)
{
n=n/10;
count++;
}
int a=0,y;
for(int i=0;i<count;i++)
{
y=n%10;
if(y>=5)
y=9-y;
else
y=y;
a+=y*(10^i);
n=n/10;
}
cout<<“new number is”<<a;
return 0;
}

use pow(10,i) …if you do ( 10^i ) …output will be xor of 10 and value of i …