Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- int main(){
- ifstream in;
- ofstream ou;
- in.open("input.txt");
- int n;
- in>>n;
- string a="",b;
- while(in>>b){
- for(int i=0;i<b.length();i++){
- if(b[i]>='A'&&b[i]<='Z')
- b[i]+=32;
- else if(b[i]>='a'&&b[i]<='z')
- b[i]-=32;
- }
- a+=b;
- a+=" ";
- }
- ou.open("output.txt");
- ou<<a;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment