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
Write a program in python to test if given number is prime or not.
Paraphin [41]

Answer:

Answer:

def main():

num = int(input("Input a number to check for prime: "))

if num > 1:

 for i in range(2,num):

  if (num % i) == 0:

   print("%d is not a prime number" % num)

   break

  else:

   print("%d is a prime number" % num)

   break

else:

 print("%d is not a prime number" % num)

 

if __name__ == "__main__":

main()

Explanation:

Solution retrieved from programiz.com.

Note, this program uses the idea of the Sieve of Eratosthenes to validate the input number by using the modulo operator to determine primeness.

The program will output to the user if the number input is indeed prime or not.

Cheers.

Explanation:

4 0
2 years ago
Read 2 more answers
A(n) _____ is the highest educational degree available at a community college. master bachelor associate specialist
baherus [9]
<span>An associate's degree requires two years of academic study and is the highest degree available at a community college</span>
5 0
3 years ago
Read 2 more answers
If a 9V, 7W radio is on from 9am to 12pm. Calculate the amount of charge that flows through it, hence or otherwise the total num
vredina [299]

Answer:

Q=It

and

p=IV

Given, v=9V P= 7W

I=P/V

I =7/9

Also, time(t) from 9am to 12pm is 3hrs

Converting into sec =3×3600

t=10800

Q= 7/9 ×10800

Q =8400C

6 0
2 years ago
What considerations should you make when deciding on the size of a table?
Kisachek [45]

Answer:

You should consider the number of cells needed for data, labels, titles, and formulas.

Explanation:

4 0
2 years ago
Phone cords are a type of twisted-pair cable and use an rj-45 connector.
Nezavi [6.7K]
The answer is FALSE

The RJ11 is most commonly known as the "telephone" standard. Most wired landline phones almost certainly use an RJ11 jack or an RJ11 connector. RJ11 has between 4 or 6 wire connection, but only 2 wires are used for connection as compared to a RJ14 which is also used in connecting telephone lines and uses 4 wires for connection.
3 0
3 years ago
Other questions:
  • Your program will demonstrate use of arrays, searching an array, using methods, passing parameters by reference, returning value
    13·1 answer
  • On a network, which protocol is responsible for dividing files into chunks, adding headers containing information for reassembli
    10·1 answer
  • When you set up a worksheet, you should use cell references in formulas whenever possible, rather than ____ values.
    11·1 answer
  • This is in government
    15·1 answer
  • Suppose that a is declared as an int a[99]. Give the contents of the array after the following two statements are executed: for
    15·1 answer
  • Tricking someone to reveal personal information, passwords, and other information that can compromise a security system is known
    13·1 answer
  • Enter a character: * ASCII #42 Enter a character: exit Not a character
    7·1 answer
  • What can happen if you do not follow the directions when cooking or baking? (Give 4 examples in a sentence each)
    8·1 answer
  • 1.Discuss why this class is important (or not) to a soon-to-be security practitioner. 2.Discuss one of more subjects you have le
    7·1 answer
  • Data stored on physical storage devices must do what before the processor can access it? Be converted to binary Be written to th
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!