prob08/manager.cpp
bool check_valid_ssn(string ssn) {
  int len = ssn.length();
  if (len != 9) {
    return false;
  }
  for (int i = 0; i < len; i++) {
    if (!isdigit(ssn[i])) {
      return false;
    }
  }
  return true;
}
// A valid ssn has 9 digits
// This function will return false if the length of the string is not 9...
// ...or if there is a non-digit character in the string.
A valid ssn has 9 digits
This function will return false if the length of the string is not 9
or if there is a non-digit character in the string.
A valid ssn has 9 digits This function will return false if the length of the string is not 9 or if there is a non - digit character in the string .
bool check_valid_ssn(string ssn) {
  int len = ssn.length();
  if (len != 9) {
    return false;
  }
  for (int i = 0; i < len; i++) {
    if (!isdigit(ssn[i])) {
      return false;
    }
  }
  return true;
}
bool check_valid_ssn ( string ssn ) { int len = ssn . length ( ) ; if ( len != 9 ) { return false ; } for ( int i = 0 ; i < len ; i ++ ) { if ( ! isdigit ( ssn [ i ] ) ) { return false ; } } return true ; }
A valid ssn has 9 digits
This function will return false if the length of the string is not 9...
...or if there is a non-digit character in the string.
A valid ssn has 9 digits This function will return false if the length of the string is not 9 ... ... or if there is a non - digit character in the string .