subject

Write a program that gets a list of integers from a user. First, the user should be asked to enter the number of integers to be stored in a list. Then your program should ask for these integers and store them in the list. Finally, the program should ask the user to enter a sentinel value that will be used to search through the integers in the list which are greater than the sentinel value. For example: If the input is: 7 50 60 140 200 75 100 172 70 the output is: 140 200 75 100 172 The 7 indicates that there are seven integers in the list, namely 50 60 140 200 75 100 172. The 70 indicates that the program should output all integers greater than 70, so the program outputs 140 200 75 100 172. You should use methods in addition to the main method. getListValues to get and store the values from the user to print the values found to be greater than the sentinel value.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
question
Computers and Technology, 23.06.2019 04:10
2pointswho was mikhail gorbachev? oa. a russian leader who opposed a coupob. a polish leader who founded the labor union "solidarityoc. a soviet leader who called for a closer relationship with the unitedstates, economic reform, and a more open societyd. a soviet leader who called for more oppression in the soviet union
Answers: 3
You know the right answer?
Write a program that gets a list of integers from a user. First, the user should be asked to enter t...
Questions