Chewbacca and no

i tried writing the below code but it shows error
#include
using namespace std;
int main()
{
int a[100];
cin>>a;
int i=0;
if(a[i]=9)
{
i++;

 }
 for(;a[i]!='\0';i++)

int digit=a[i]-‘0’;
if(digit>=5)

 {digit=9-digit;
 a[i]=digit+'0';
 }
 cout<<a<<endl;
 return 0;

}

hi neharika
take a char array in the input
then only these statements are meaningful
a[i]=digit-‘0’ and a[i]=digit+‘0’

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.