fork(2) download
  1. class Main {
  2. public static void main (String[] args) {
  3. int x = 534;
  4. switch (x / 200) {
  5. case 0:
  6. System.out.println("entre 0 e 199");
  7. break;
  8. case 1:
  9. System.out.println("entre 200 e 399");
  10. break;
  11. case 2:
  12. System.out.println("entre 400 e 599");
  13. break;
  14. default:
  15. System.out.println("600 ou mais");
  16. break;
  17. }
  18. }
  19. }
  20.  
  21. //https://pt.stackoverflow.com/q/258024/101
Success #stdin #stdout 0.06s 32500KB
stdin
Standard input is empty
stdout
entre 400 e 599