aboutsummaryrefslogtreecommitdiff
path: root/mod11c.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mod11c.cpp')
-rw-r--r--mod11c.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/mod11c.cpp b/mod11c.cpp
index 3e6ef18..2ce45b5 100644
--- a/mod11c.cpp
+++ b/mod11c.cpp
@@ -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;
+ }
+ }
}