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
evablogger [386]
2 years ago
11

Given a sorted list of integers, output the middle integer. assume the number of integers is always odd.

Computers and Technology
1 answer:
Svetllana [295]2 years ago
4 0

integer userInput

integer i

integer mid

integer array(20) number

userInput = 1

for i = 0; userInput >= 0; i = i + 1

  if number[i] > -1

     userInput = Get next input

     number[i] = userInput

i = i - 1

mid = i / 2

if i > 9

  Put "Too many inputs" to output

elseif i % 2 == 0

  Put number[mid - 1] to output

else

  Put number[mid] to output

You might be interested in
The mouse and keyboard are also sometimes called
likoan [24]
Hi!

The mouse and the keyboard are <em>input devices. </em>By using them, we can input data which will give us a (hopefully) desired output!

For example...

Just by using my keyboard to type, I'm inputting data in the form of ASCII characters and symbols.

By using my mouse to click on an area so I can move this sentence on a new line, I had to input a request to do such!

Hopefully, this helps! =)
7 0
3 years ago
100 points, PLEASE HELP...To generate numbers between and including -10 to 10 you would use:
Orlov [11]

Answer:

A number line?

6 0
3 years ago
How long will it take to transfer 1GB data on USB 2.0, on USB 3.0
cupoosta [38]

Answer:

Have a great day, Here is the answer to your question:

It will take around 18 seconds

Explanation:

So in principle 1GB of data to be uploaded running at peak speed is suggested to take around 18 seconds but in fact, DCD test results show USB 2.0 takes 3 minutes 18 seconds to complete a 1GB switch. Whereas USB 3.0 can accommodate up to 5gbps of data transferred-more than 10 times faster than its predecessor.

8 0
3 years ago
On laptops with a smart card reader installed, where is the smart card reader usually located?
dem82 [27]
Plenty of space in the palm rest
4 0
3 years ago
Jasmine is a commercial artist her is is the one most often used by graphic designers publishers and others in her field the os
VikaD [51]
OS is for mac so she used the mac computer
7 0
3 years ago
Other questions:
  • Your game design company has recently asked all employees to use a specific personal information management application (PIM) to
    6·1 answer
  • Which of the following is a valid call for the generic method declared below? and why?
    9·2 answers
  • Rachel uses a word processor to write short stories. However, most of her time is spent toying with the keys, rather than in wri
    13·2 answers
  • You modify a document that is saved on your computer. Where are the changes stored until you save the document?a. Radom access m
    15·1 answer
  • One horsepower is equal to how many foot-pounds of work per second?
    10·2 answers
  • As a consommé simmers, the meat and eggs coagulate, forming a
    6·1 answer
  • categorize each job role as an administrative job or management job auditor director legal secretary payroll clerk etc ​
    8·1 answer
  • Which of the following is the best way to keep up with trends in your industry?
    8·1 answer
  • Your program will be used by many departments at the university. Your comments will be important to their IT people. What would
    13·1 answer
  • A customer dictates instruction on how to transcribe audio. Do you have to transcribe the instruction word for word?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!