Skip to content

Instantly share code, notes, and snippets.

@2hanX
Created June 19, 2020 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2hanX/3880e389e9c80ce8d3c58ba4673d1ca4 to your computer and use it in GitHub Desktop.
Save 2hanX/3880e389e9c80ce8d3c58ba4673d1ca4 to your computer and use it in GitHub Desktop.
#include<iostream>
#include<cctype>
using namespace std;
int main()
{
char a;
cin.get(a);
while (a != '@')
{
if (isupper(a))
cout << char(a + 32);
else if (islower(a))
cout << char(a - 32);
else if (isdigit(a))
cout << "";
else if (isspace(a))
cout << " ";
else
cout << a;
cin.get(a);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment