fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args)
  8. {
  9. Scanner in = new Scanner(System.in);
  10. String c = in.nextLine();
  11. String str = "";
  12. for (int i = 0; i < c.length(); i++) {
  13. if (c.charAt(i) <= 'z' && c.charAt(i) >= 'a')
  14. str += Character.toUpperCase(c.charAt(i));
  15. else
  16. str += Character.toLowerCase(c.charAt(i));
  17. }
  18. System.out.print(str);
  19. }
  20. }
Success #stdin #stdout 0.07s 2184192KB
stdin
sdadASDASFW
stdout
SDADasdasfw