You are viewing a single comment's thread. Return to all comments →
public static void main(String[] args) { int n = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); scanner.close(); String w = "Weird"; String notw = "Not Weird"; if ((1 <= n) && (n <= 100)){ if ((n % 2) ==0){ if ((n >=6) && (n<=20)){ System.out.println(w); }else{ System.out.println(notw); } }else{ System.out.println(w); } }else{ System.out.println("Entrar com um numero valido"); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Java If-Else
You are viewing a single comment's thread. Return to all comments →