Alayna and Strings

Alayna’s father Baba gifted her a nice alphabet book last month. And now Alayna is in love with alph…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

WHY get WA in last case??
#include <bits/stdc++.h>

using namespace std;

int main() {
char c[210],a;
int i,len,ccount=0,scount=0;
fgets(c,220,stdin);
len = strlen(c);
for(i=0;i<len;i++)
{
if(c[i]>=‘A’ && c[i]<=‘Z’)
ccount++;
else if(c[i]>=‘a’ && c[i]<=‘z’)
scount++;
else
continue;
}
cout<< ccount << " " << scount << endl;

return 0;

}

Try again by removing that “=” sign before ‘z’ and ‘Z’ . My code accepted by removing that.