dimanche 23 mai 2021

If I copy this code then it shows an error but If I rewrite the same code then it works perfect why? [closed]

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        // put your code here
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        if((a > −15) && (a <= 12) || (a > 14) && (a < 17) || (a >= 19)){
            System.out.println("True");
        }
        else {
            System.out.println("False");
        }
    }
}

It doesn't work if you directly copy and paste but it will if you rewrite it

Aucun commentaire:

Enregistrer un commentaire