// Converts all lower case alphabetic characters to upper case // characters, and vice versa. All others are left untouched. #include #include void main() { char ch; // Input character for ( ;; ) { cin.get(ch); if ( cin.fail() ) break; if (isupper(ch)) { cout << (char) tolower(ch); } else if (islower(ch)) { cout << (char) toupper(ch); } else { cout << ch; } // if } // for } // main