Write an array java program asking the user how many integer numbers to read in and create a one dimensional array of that size. One program will do the following individual task in "inline" code: 1. After numbers have been obtained from the user (separate the input from output by a couple of blank lines) and stored in the array, search the array with a loop to find the smallest subscript (index) of the largest number and then print both the largest number and smallest subscript (index) for that number. 2. Next, search the array again with a separate loop to find the largest subscript (index) of the smallest number and then print both the largest subscript (index) for that number. 3. The program then should ask the user for yet another integer and will search the array for that integer, counting how many times that integer appears in the array before printing both the integer of interest and the count of how many times it appeared in the array. 4. Finally, the program will print the contents of the entire array horizontally on one line with three spaces between each value. 10 will be the query of how many numbers will occupy the array. -9, 100, 50, -30, 100, -30, 80, 50, 50, -9 will be the numbers as the contents of the array. 50 will be the query of what number to search for and count
Write an array java
One program will do the following individual task in "inline" code:
1. After numbers have been obtained from the user (separate the input from output by a couple of blank lines) and stored in the array, search the array with a loop to find the smallest subscript (index) of the largest number and then print both the largest number and smallest subscript (index) for that number.
2. Next, search the array again with a separate loop to find the largest subscript (index) of the smallest number and then print both the largest subscript (index) for that number.
3. The program then should ask the user for yet another integer and will search the array for that integer, counting how many times that integer appears in the array before printing both the integer of interest and the count of how many times it appeared in the array.
4. Finally, the program will print the contents of the entire array horizontally on one line with three spaces between each value.
10 will be the query of how many numbers will occupy the array.
-9, 100, 50, -30, 100, -30, 80, 50, 50, -9 will be the numbers as the contents of the array.
50 will be the query of what number to search for and count
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images