Write a Java program that lets the user enter a series of integers with an input range from 2 to 199. The user must enter a value of -1, 0, +1, or +3 (a sentinel which must be an integer and not part of the series of numbers) in order to signal the end of the series. After all the numbers have been entered, the program should display the smallest and largest numbers entered, and not include the sentinel. Note that this must be a Java implementation, and not pseudo-code, etc. You must use a Loop and If-Else/Select constructs as well. Also include a flow-chart.
Write a Java program that lets the user enter a series of integers with an input range from 2 to 199. The user must enter a value of -1, 0, +1, or +3 (a sentinel which must be an integer and not part of the series of numbers) in order to signal the end of the series. After all the numbers have been entered, the program should display the smallest and largest numbers entered, and not include the sentinel. Note that this must be a Java implementation, and not pseudo-code, etc. You must use a Loop and If-Else/Select constructs as well. Also include a flow-chart.
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
Related questions
Question
- Write a Java
program that lets the user enter a series of integers with an input range from 2 to 199. The user must enter a value of -1, 0, +1, or +3 (a sentinel which must be an integer and not part of the series of numbers) in order to signal the end of the series.
- After all the numbers have been entered, the program should display the smallest and largest numbers entered, and not include the sentinel. Note that this must be a Java implementation, and not pseudo-code, etc. You must use a Loop and If-Else/Select constructs as well.
- Also include a flow-chart.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT