Ad
  • Default User Avatar

    Please help me !!

    #include <stdbool.h>
    #include <stdio.h>
    #include <stdlib.h>

    bool xo (const char* str)
    {

    int count = 0;
    for (int i = 0; i < strlen(str); i++){
      if(str[i] == "x" || str[i] == "X"){
        count++;
      }
    }
    

    return count;

    int countY = 0;
      for (int j = 0; j < strlen(str); j++;){
      if(str[j] == "y" || str[j] == "Y" ){
        countY++;
        }
    }
    

    return countY;

    if (count == countY){
    return true;
    }
    else {return false;}
    }