Advertisement
wojiaocbj

problem1

Feb 2nd, 2023
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     char c;
  5.     while((c=getchar())!=EOF)
  6.     {
  7.         if(c>='A'&&c<='Z')
  8.         printf("%c",c+'a'-'A');
  9.         else if(c>='a'&&c<='z')
  10.         printf("%c",c+'A'-'a');
  11.         else if(c>'5'&&c<='9')
  12.         printf("9");
  13.         else if(c>='0'&&c<'5')
  14.         printf("0");
  15.         else if('5'==c)
  16.         printf("5");
  17.         else
  18.         printf("%c",c);
  19.     }
  20.     return 0;
  21.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement