how do I make a program to to prompt user to enter a positive integer value. Protect
Fantastic news! We've Found the answer you've been seeking!
Question:
how do I make a program to to prompt user to enter a positive integer value. Protect the input and validate that input is a positive number. Store each value, as it is entered, into an array list of type integer. Continue prompting for input until the user enters a negative number. For the resulting array list, determine the following using an appropriate type of iteration and algorithmic pattern:
- How many values greater than 15 were entered?
- How many values between 15 and 25 were entered?
- Where in the array list are the values between 15 and 25?
- What is the maximum value in the array list?
- Where are the maximum values? There may be more than one.
- What is the average of the values entered in first half versus the average of the values entered in the second half?
Related Book For
Principles Of Information Security
ISBN: 9780357506431
7th Edition
Authors: Michael E. Whitman, Herbert J. Mattord
Posted Date: