algorithms/strings/mars-exploration.c
int marsExploration(char* s) {
    int errors = 0;
    for (int i = 0; s[i]; i += 3) {
        if (s[i] != 'S') errors++;
        if (s[i+1] != 'O') errors++;
        if (s[i+2] != 'S') errors++;
    }
    return errors;
}
// Complete the marsExploration function below.
Complete the marsExploration function below.
Complete the marsExploration function below .
int marsExploration(char* s) {
    int errors = 0;
    for (int i = 0; s[i]; i += 3) {
        if (s[i] != 'S') errors++;
        if (s[i+1] != 'O') errors++;
        if (s[i+2] != 'S') errors++;
    }
    return errors;
}
int marsExploration ( char * s ) { int errors = 0 ; for ( int i = 0 ; s [ i ] ; i += 3 ) { if ( s [ i ] != ' ' ) errors ++ ; if ( s [ i + 1 ] != ' ' ) errors ++ ; if ( s [ i + 2 ] != ' ' ) errors ++ ; } return errors ; }
Complete the marsExploration function below.
Complete the marsExploration function below .