1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DochEvi [55]
2 years ago
11

The four smallest numbers (40 points) Write an ANNA assembly program (smallest_four.ac) that finds the four smallest numbers ent

ered 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.
Computers and Technology
1 answer:
kari74 [83]2 years ago
6 0

Answer:

the answer is -25

Explanation:

You might be interested in
How do functions work ? Functions use and operators ,perform calculations , and return a .
Nina [5.8K]

Functions use arguments and operators, perform calculations and return a value.  

5 0
3 years ago
Assume that month is an int variable whose value is 1 or 2 or 3 or 5 ... or 11 or 12. Write an expression whose value is "jan" o
Tamiku [17]

Answer:

The code is given below

Explanation:

The correct syntax would be to place appropriate parenthesis.

(month==1?"jan":(month==2?"feb":(month==3?"mar":(month==4?"apr":(month==5?"may":(month==6?"jun":(month==7?"jul":(month==8?"aug":(month==9?"sep":(month==10?"oct":(month==11?"nov":"dec")))))))))));

Similarly, you can also use the following code:

String[] months = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" };

int month = 1;

String monthDescription = months[month - 1];

7 0
3 years ago
Which devices are most likely to communicate with the internet? Select 3 options.
Anon25 [30]
<h2>Answer:</h2>

<h3>smart phone </h3>

<h3>cars </h3>

<h3>delivery trucks</h3>
5 0
3 years ago
If you would like to give another user permissions on your mailbox or to particular folders within your mailbox, which role shou
Darya [45]

Answer:

Delegate

Explanation:

8 0
3 years ago
Type 1 hypervisors are common in data centers and in cloud computing.<br><br> A. True<br> B. False
Annette [7]

Answer: a

Explanation: just cause

6 0
3 years ago
Other questions:
  • Using the college registration example from section 6.7.3 as a starting point, do the following:
    14·1 answer
  • When might be the best time to start saving for retirement?
    5·2 answers
  • Read the excerpt from The Code Book. Other attacks include the use of viruses and Trojan horses. Eve might design a virus that i
    13·1 answer
  • Harmful programs used to disrupt computer operation, gather sensitive information, or gain unauthorized access to computer syste
    7·1 answer
  • What is displayed on the console when running the following program?
    5·1 answer
  • Anyone watch anime, i love stay kids and they sang the op for Tower of God XD
    8·2 answers
  • Write a static method called split that takes an ArrayList of integer values as a parameter and that replaces each value in the
    12·1 answer
  • An alternative to hexadecimal notation for representing bit patterns is dotted decimal notation in which each byte
    11·1 answer
  • Need help plz 100 POINTS
    10·2 answers
  • 2. what are the advantages of breaking up a single logical message into a number of fixed-sized packets and then sending each on
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!