We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
private static final Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
int N = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
Java If-Else
You are viewing a single comment's thread. Return to all comments →
Im new to Java and this code just cropped up with a whole heap of errors. What should I work on as I don't even know where to start...
import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.regex.*;
public class Solution {
If(n % 2 != 0){ System.out.println("Weird"); } If(n % 2 == 0 && >2 && <5){ System.out.println("Not Weird"); } If(n % 2 == 0 && >6 && <20){ System.out.println("Weird"); else{ System.out.println("Not Weird"); } } scanner.close(); } }