Write a Java program that accepts an integer number from the user between 20 and 100. Next, divide the number by 12 and determine if the remainder is even or odd.
Inputs: The program must prompt the user for an integer value between 20 and 100.
Enter an integer between 20 and 100:
Output: The program should have an output similar to this. The < and > symbols will contain the actual values entered and calculated.
The remainder of divided by 12 is , and it is .
Example of a program run: The value 35 is entered by the user
Enter an integer between 20 and 100: 35
The remainder of 35 divided by 12 is 11, and it is odd.

Respuesta :

import java.util.Scanner;
class hola
{
public static void main(String[]args)
{
Scanner x=new Scanner(System.in);
int a=x.nextInt();
int b;
if(a>20&&a<100)
{
b=a%12;
if(b%2==0){
System.out.print("es par"+b);
}
else{
System.out.print("es impar"+b);
}
}
}

}

Answer:

Hm

Explanation: