You are viewing a single comment's thread. Return to all comments →
try this System.out.println((n%2==1 || (n>=6 && n<=20)) ? "Weird" : "Not Weird");
Java If-Else
You are viewing a single comment's thread. Return to all comments →
try this System.out.println((n%2==1 || (n>=6 && n<=20)) ? "Weird" : "Not Weird");