Advertisement
evgenko

строки(с)

Jun 2nd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     char stroka[100];
  8.     int i=0;
  9.     cin.getline(stroka,100);
  10.     while (stroka[i]!=0)
  11.     {
  12.         {if ((stroka[i]>96)&&(stroka[i]<123))
  13.         {
  14.             stroka[i]-=32;
  15.         }
  16.         else
  17.         {
  18.             if ((stroka[i]>64)&&(stroka[i]<91))
  19.             stroka[i]+=32;
  20.         }}
  21.         i++;
  22.     }
  23.     i=0;
  24.     while (stroka[i]!=0)
  25.     {
  26.         cout<<stroka[i];
  27.         i++;
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement