diff options
Diffstat (limited to 'mod11c.cpp')
| -rw-r--r-- | mod11c.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -120,7 +120,19 @@ void isPalindrome () void isAlpha () { - cout << " alphabet check" << endl; + char str[MAX]; + int i; + + cout << "Enter a string to test: "; + cin >> str; + + for (int i = 0; str[i] != '\0'; i++) + { + if (!isalnum(str[i])) + { + cout << str[i] << " is not alphanumeric" << endl; + } + } } |