Create a java program reads an integer


Discuss the below:

Q: Create a Java program that reads an integer and checks whether it is even.

If my input is 25, my output should be:

Is 25 even?

false

If my input is 2000, my output should be:

Is 2000 even?

true

Also, the program must check if the number the user entered is between 1 and 1000.

If my input is 25, my output should be:

The number 25 between 1 and 1000 is true.

If my input is 2000, my output should be:

The number 2000 between 1 and 1000 is false.

1. The input and output must use JOptionPane dialog and display boxes.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a java program reads an integer
Reference No:- TGS01935070

Now Priced at $20 (50% Discount)

Recommended (98%)

Rated (4.3/5)