Guest User

Untitled

a guest
Jul 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. public static int Inverse(int x)
  2. {
  3. System.out.println(x);
  4. switch(x)
  5. {
  6. case 001 : x= 001;
  7. break;
  8. case 010 : x= 101;
  9. break;
  10. case 011 : x= 110;
  11. break;
  12. case 100 : x= 111;
  13. break;
  14. case 101 : x= 010;
  15. break;
  16. case 110 : x= 011;
  17. break;
  18. case 111 : x= 100;
  19. break;
  20.  
  21. default: System.out.println("Wrong Input"); ;
  22.  
  23. }
  24. return x;
  25. }v
Add Comment
Please, Sign In to add comment