shinema

Untitled

Oct 12th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4. int main(){
  5. ifstream in;
  6. ofstream ou;
  7. in.open("input.txt");
  8. int n;
  9. in>>n;
  10. string a="",b;
  11. while(in>>b){
  12. for(int i=0;i<b.length();i++){
  13. if(b[i]>='A'&&b[i]<='Z')
  14. b[i]+=32;
  15. else if(b[i]>='a'&&b[i]<='z')
  16. b[i]-=32;
  17. }
  18. a+=b;
  19. a+=" ";
  20. }
  21. ou.open("output.txt");
  22. ou<<a;
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment