bool checkRecord(char * s){ int Acount = 0; int Lcount = 0; for (int i=0; i<strlen(s); i++) { if (s[i] == 'A') { Acount++; if (Acount > 1) return false; } else if (s[i] == 'L') { Lcount++; if (Lcount >2) return false; continue; } Lcount = 0; } return true; }