subject

The four smallest numbers (40 points) Write an ANNA assembly program (smallest_four. ac) that finds the four smallest 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 (smallest) numbers. For instance, if the user entered 2, 6, 7, 6, 5, 7, 6, 17, 15 -1; the program should print 2, 5, 6, 6 (the four smallest 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 smallest 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. • Note that 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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:50
Can online classes such as gradpoint track your ip location like if im taking a final and i give somebody else my account and they take the final for me will it show where they are taking the final from? and can this be countered with a vpn
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 22.06.2019 21:50
Given int variables k and total that have already been declared, use a while loop to compute the sum of the squares of the first 50 counting numbers, and store this value in total. thus your code should put 11 + 22 + 33 + + 4949 + 50*50 into total. use no variables other than k and total.
Answers: 2
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
You know the right answer?
The four smallest numbers (40 points) Write an ANNA assembly program (smallest_four. ac) that finds...
Questions
Questions on the website: 13722363