Holes in the text

My programming is not running pls help(i have removed the test cases.)

#include <stdio.h>
#include <conio.h>
int main()
{
int i,j,count=0;

char a[100];


    gets(a);
    for(j=0;a[j]!='\0';j++)
    
    {
     if(a[j]='B'){count=count+2;}
     if(a[j]='A'){count++;}
     if(a[j]='D'){count++;}
     if(a[j]='O'){count++;}
     if(a[j]='P'){count++;}
     if(a[j]='R'){count++;}       
     j++;
     }
     printf("%d\n",count);
     
getch();
return 0;

}

U forgot that the letter Q also has one hole.

1 Like

And secondly, u wrote a[j]=‘A’ it shud be == . Hope this is a typo, but = is assignment operator, == is equality