Please point mistake in my code... where am i going wrong?

#include<bits/stdc++.h>
using namespace std;
int main(){
long long int n;
cin>>n;
long long int b,c=0,y=0,x;
x=n;
int a[200], i=0;
while(x>0){
int k=x%10;
if(k>=5){
a[i]=9-k;
}
else{
a[i]=k;
}
x=x/10;
i++;
}
for(int j=i-1; j>=0; j-- ){
cout<<a[j];
}

}

hello @amit007
pls share ur code by saving it here->https://ide.codingblocks.com/