#include <iostream>
#include <cctype>
int main()
{
using std::cout;
using std::cin;
char ch;
cin.get(ch);
while (ch != '@')
{
if (!(isdigit(ch) && isxdigit(ch)))
{
if (isalpha(ch))
isupper(ch) ? tolower(ch) : toupper(ch); //Think problem is here, it goes into the second
// if correctly, but it doesn't seem to do this part.
cout << ch;
}
cin.get(ch);
}
return 0;
}
Any help would be appreciated. I'm sure its something simple that I'm overlooking.
EDIT: telling you what the program is meant to do might help. It is supposed read keyboard input to the @ symbol, echo that input excluding digits, also converting each uppercase character to lower and vice versa. Its that last part that is proving difficult.