123456789101112131415161718192021
#include <iostream> #include <string> using namespace std; bool valid_string(const string& input) { // place your code here } int main() { string input; cout << "Enter string to test: "; getline(cin, input); bool valid = valid_string(input); if (valid) cout << "valid"; else cout << "Not valid"; }