diff options
| author | Tyler Taormina <[email protected]> | 2021-11-10 20:32:17 -0800 |
|---|---|---|
| committer | Tyler Taormina <[email protected]> | 2021-11-10 20:32:17 -0800 |
| commit | a382ab74014c72df793e9e6d055bb1682a219bca (patch) | |
| tree | 75f9c10287404d24a8c3ce68181e94f04472d2cf /mod11c.cpp | |
| parent | countChar function is working! (diff) | |
| download | cst116-lab6-till-t-master.tar.xz cst116-lab6-till-t-master.zip | |
Tyler Taormina
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; + } + } } |