Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstring>
- using namespace std;
- void trans(char &c)
- {
- if(c>='a' && c<='z') c=tolower(c);
- if(c<='A' && c<='Z') c=toupper(c);
- }
- int main()
- {
- char s[100];
- int i;
- cin.getline(s,100);
- for(i=0;i<strlen(s);i++)
- {
- trans(s[i]);
- }
- cout<<s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement