Holes problem

#include
using namespace std;
int main()
{
char a[5],i,j,n,count=0;
cout<<“Enter the value of n :”;
cin>>n;
cout<<"\n Enter the character “;
for(i=0;i<n;i++)
{
cin>>a[i];
}
for(i=0;i<n;i++)
{
cout<<“Charactered entered are :”<<a[i];
}
for(i=0;i<n;i++)
{
if(a[i]==‘A’ || a[i]==‘D’|| a[i]==‘O’ || a[i]==‘P’ || a[i]==‘R’)
{
count+=1;
}
if(a[i]==‘B’)
{
count+=2;
}
}
cout<<”\n Total number of holes in the plane is "<<count;
return 0;
}

can anyone please check this, why this code is not working? specially the input

1)You dont need to print anything like cout<<"\n Enter the character ";. Only take input and print the output. No need to ask to enter. Output should be cout<< <<count << endl.

  1. The maximum length of string is 100 so your array should be of length 101 or greater.

  2. I think you have forgotten ‘Q’