Holes:Getting Wa

#include<stdio.h>
#include<string.h>
int main()
{
int i,l,t,cnt=0;
char str[100];
scanf("%d",&t);
if(t>=1 && t<=40)
for(l=1;l<=t;l++)
{
scanf("%s",str);
for(i=0;str[i]!=’\0’;i++)
{
if(str[i]>=‘A’ && str[i]<=‘Z’)
{
if(str[i]==‘Á’ || str[i]==‘D’ || str[i]==‘O’ || str[i]==‘R’ || str[i]==‘P’ || str[i]==‘Q’)
{
cnt++;
}
else if(str[i]==‘B’)
{
cnt+=2;
}
else
{
cnt+=0;
}

		}
	}
	printf("%d",cnt);
	cnt+=0;
printf("\n");
}

return 0;

}

One error is that the value of your cnt variable for each test case is getting accumulated.
I think that you were intended to write cnt=0; instead of cnt+=0 just before printf("\n");

The other error is that in comparison str[i]=='A' , A is not latin character A, but Á . You may have done it by mistake.

THANKS FRIEND NOW I GOT THE CORRECT ANSWER

Please accept/upvote the answer and show some well deserved appreciation