subject

Write an ANNA assembly program (top_four. ac) that finds the four largest numbers entered by the user. Initially, the program continually asks the user to enter numbers. As
soon as a negative value is entered, compute which numbers are the top four (largest)
numbers. For instance, if the user entered 2, 6, 7, 6, 6, 7, 6, 17, 15 -1; the program should
print 17, 15, 7, 7 (the four largest numbers in the sequence). If the user enters a negative
number at the beginning, print 0. If the user enters four or fewer numbers, print all the
numbers as output.
Notes:
• The goal of this problem is to exercise storing, retrieving, and scanning the numbers
stored in memory. Therefore a solution where you keep track of the max four
numbers in registers as the numbers are entered is not acceptable. Such a solution
will receive a maximum of 15 points for this problem.
• Do not keep track of everything in the input loop. You will need to store all numbers
entered by the user in memory.
• Store all numbers entered into a growing array.
• The array should be the last item in your data section so it can grow as large as
necessary.
• You may assume there is enough memory to hold all numbers entered by the user

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:10
Write a function so that the main0 code below can be replaced by the simpler code that calls function mphandminutes tomiles0. original main0 int main) l double milesperhour-70.0; double minutestraveled = 100.0; double hourstraveled; double milestraveled; hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; cout < "miles" 2 using namespace std; 4 /* your solution goes here/ 6 int maino 1 test passed 7 double milesperhour 70.0 all tests passed 8 double minutestraveled 100.0; 10 cout < < "miles: " < < mphandminutestomiles(milesper-hour, minutestraveled) < < endl; 12 return 0; 13
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 24.06.2019 07:00
Guys do you know sh27 cause he hacked me : ( pidgegunderson my old user
Answers: 2
question
Computers and Technology, 25.06.2019 05:00
7. the cullerton park district holds a mini-olympics each summer. create a class named participant with fields for a name, age, and street address. include a constructor that assigns parameter values to each field and a tostring() method that returns a string containing all the values. also include an equals() method that determines two participants are equal if they have the same values in all three fields. create an application with two arrays of at least eight participants each—one holds participants in the mini-marathon, and the other holds participants in the diving competition. prompt the user for participant values. after the data values are entered, display values for participants who are in both events. save the files as participant.java and twoeventparticipants.java.
Answers: 2
You know the right answer?
Write an ANNA assembly program (top_four. ac) that finds the four largest numbers entered by the us...
Questions
question
Biology, 21.08.2020 20:01
Questions on the website: 13722363