Advertisement
dllbridge

Untitled

Oct 22nd, 2022
842
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. string b, c;
  5.  
  6. ///////////////////////////////////////////////////////
  7. int main()                                          //
  8. {
  9.    
  10.  cin >> b;
  11.  c   =  b;
  12.  
  13. for(int i = 0; i <= b.size(); i++)
  14. {
  15.    
  16.        if(b[i] >= 'a' && b[i] <= 'z')  
  17.        b[i] = b[i] - 'a' + 'A';
  18. }
  19.  
  20. for(int i = 0; i <= c.size(); i++)
  21. {
  22.    
  23.        if(c[i] >= 'A' && c[i] <= 'Z')  
  24.        c[i] = c[i] - 'A' + 'a';
  25. }
  26.  
  27.  
  28. for(int i = 0; i < c.size(); i++) cout << c[i];
  29.                                   cout << endl;
  30. for(int i = 0; i < b.size(); i++) cout << b[i];
  31.  
  32. }
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement