Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main()
- {
- char str[51];
- cin.getline(str, 50);
- for(int i = 0; i < strlen(str); i++){
- if(islower(str[i])){
- str[i] = toupper(str[i]);
- } else if (isupper(str[i])){
- str[i] = tolower(str[i]);
- }
- }
- cout << str;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement