import java.util.*;
public class Exercise49 {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
System.out.print("Input a number: ");
int n = in.nextInt();
if (n % 2 == 0) {
System.out.println(1);
}
else {
System.out.println(0);
}
}
}
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer