Question: Write a Java program that detects if a given number falls in a closed interval. A closed interval includes the endpoints. The program first accepts
Write a Java program that detects if a given number falls in a closed interval. A closed interval includes the endpoints. The program first accepts the endpoints of the interval in any order. Next the program accepts the number to test for interval inclusion. Your program will then computer whether the number is in the interval or not and then output the result. Enter the two integer interval points: 22 6 Enter the integer test point: 17 17 falls in the interval [6,22]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
