allia

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

Sep 18th, 2020
959
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data