Advertisement
MUstar

IoT C언어 0703 - EX_02

Jul 3rd, 2017
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5.     char ch;
  6.     int res;
  7.  
  8.     while(1)
  9.     {
  10.         res = scanf("%c", &ch);
  11.         if(ch == 10) break;
  12.         if((ch>=65)&&(ch<=90)) ch+=32;
  13.         else if ((ch>=97)&&(ch<=112)) ch-=32;
  14.         else ch=ch;
  15.         printf("%c", ch);
  16.     }
  17.     putchar('\n');
  18.  
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement