Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
304 B
0
Indexable
Never
#include <iostream>
#include <string>
using namespace std;
char foo(char &h) {
	if (int(h) >= 65 && int(h) <= 90) h += 32;
	else if (int(h) >= 97 && int(h) <= 122) h -= 32;
	return h;
}
int main() {
	string n;
	getline(cin, n);
	for (int i = 0; i < n.size(); i++){
		cout << foo(n[i]);
	}
}