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]
3 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]3 years ago
6 0

Answer:

the answer is -25

Explanation:

You might be interested in
Suppose we are sorting an array of nine integers using heapsort, and we have just finished one of the reheapifications downward.
Ilia_Sergeevich [38]

Answer:

3

Explanation:

Heap sort pick an item from the first or last position in an array and compares it with other items in other positions in the array, swapping position if they meet the condition.

The array above has three maximum items arranged sequentially in the array, this is prove that there have been 3 reheapifications in the array.

7 0
3 years ago
When you adopt a certain framework or strategy for solving a series of problems, you may fail to see other, more efficient ways
Olegator [25]
I believe it is called closed mindset. Closed mindset is when you fail to see other ways to your error and don't accept help or think you can improve.
7 0
3 years ago
What is the mass of the light bulb? a. 425.6 g b. 204.6 g c. 240.56 g d. 245.6 g
Veronika [31]
The answer to your question is ----> <span>245.6 g

Hope this answer has helped you. If it has, please mark it a brainliest. Thanks.

Have a BRAINLY day.</span>
4 0
4 years ago
Read 2 more answers
Consider the two relations with their schemas as listed below: Employee(name, empID, birthDate, gender, address, phone) TaxAccou
Allushta [10]

Answer:

CREATE TABLE TaxAccount (

Name int NOT NULL,

SSN int NOT NULL,

empID int FOREIGN KEY REFERENCES employee(empID),

federalDeductionAmt int NOT NULL,

stateDeductionAmt int NOT NULL,

ficaDeductionAmt int NOT NULL

);

Explanation:

TaxAccount table will use the primary key of employees table 'empID' which will serve as foreign key in TaxAccount table.

Therefore TaxAccount table will look like this:

CREATE TABLE TaxAccount (

Name int NOT NULL,

SSN int NOT NULL,

empID int FOREIGN KEY REFERENCES employee(empID),

federalDeductionAmt int NOT NULL,

stateDeductionAmt int NOT NULL,

ficaDeductionAmt int NOT NULL

);

5 0
3 years ago
Write a switch statement that tests the value of the char variable response and performs the following actions: if response is y
kirill [66]

// Here is the required switch statement on response character

switch(response){

case 'y': // case to check if the response is y

cout<<" Your request is being processed ";

case 'n': // case to check for n

cout<<" Than you, anyway for your consideration";

case 'h': // case to check for h

cout<<"Sorry \, no help is currently available.";

default : // default case

cout<< Invalid entry: please try again.";

}

6 0
3 years ago
Other questions:
  • Which of the following is a way to prevent wastes from contaminating the environment? A) Use absorbent pads to collect floor was
    11·2 answers
  • What is the statement describing? Agile team continuously adapt to new circumstances and enhance the methods of value delivery
    6·1 answer
  • 4-One possible performance multiplication enhancement is to do a shift and add instead of an actual multiplication. Since 9 * 6,
    12·1 answer
  • John has subscribed to a cloud-based service to synchronize data between his smartphone, tablet, and PC. Before allowing the dat
    10·1 answer
  • Write a routine to interchange the mth and nth elements of a singly-linked list. You may assume that the ranks m and n are passe
    10·1 answer
  • What was the first portable computer called and who made it?
    9·1 answer
  • Where can we buy a cryptocurrency? from below options
    11·1 answer
  • Pleasee help. How do you fix this problem in discord?
    10·1 answer
  • A structure that organizes data in a list that is commonly 1-dimensional or 2-
    5·1 answer
  • 1) a program that is designed to perform only one task.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!