Advertisement
allia

смена регистра

Sep 18th, 2020
1,096
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <sstream>
  4. #include <string>
  5. using namespace std;
  6. int main()
  7. {
  8.   string a;
  9.   int n=0;
  10.  
  11.   getline (cin, a);
  12.   n=a.size();
  13.   for (int i=0; i<n; i++)
  14.   {
  15.     int b=(int)a[i];
  16.     if (b>90)
  17.       b-=32;
  18.     else
  19.        b+=32;
  20.       cout << (char)b;
  21.   }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement