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
You have probably heard of wearable fitness devices, such as FitBit. What new products do you think might exist in this field in
tino4ka555 [31]

The new products in this fitness field in a decade are:

  • TRX Home2 System.
  • Rogue Rubber Coated Kettlebells.
  • Stamina Adjustable Kettle Versa-Bell, etc.

<h3>What is the use of artificial intelligence in fitness?</h3>

AI is known to be in the field of wellness and also fitness as it has made product such as:

  • GOFA Fitness that uses GPS.
  • 3D motion tracking technology.
  • Machine learning to give users with live feedback when in a workouts, etc.

Therefore, The new products in this fitness field in a decade are:

  • TRX Home2 System.
  • Rogue Rubber Coated Kettlebells.
  • Stamina Adjustable Kettle Versa-Bell, etc.

Learn more about fitness from

brainly.com/question/1365564

#SPJ1

5 0
2 years ago
Create a function, return type: char parameters: int *, int * Inside the function, ask for two integers. Set the user responses
iris [78.8K]

Answer and Explanation:

In C programming language:

char fun(int*a, int*b){

printf("enter two integers: ");

scanf("%d%d",a,b);

int e;

printf("please enter a character: ");

e=getchar();

return e;

}

int main(int argc, char *argv[]) {

int d;

int f;

int g;

fun();

printf("%d%d%d", d, f, g);

}

We have declared a function fun type char above and called it in main. Note how he use the getchar function in c which reads the next available character(after the user inputs with printf()) and returns it as an integer. We then return the variable e holding the integer value as char fun() return value.

4 0
3 years ago
What are some options available when you click File and then Print? (Multiple Choice)
WITCHER [35]

Answer:

Changing Margins

Selecting the Printer

Viewing a preview

Selecting the pages to print

Changing the page orientation

Explanation:

3 0
3 years ago
Digital information is stored using a series of ones and zeros. Computers are digital machines because they can only read inform
ryzh [129]
Is known as the binary system
8 0
3 years ago
Read 2 more answers
. A store and forward switching strategy is generally used in ______ switched network.
xz_007 [3.2K]
The answer would be a
5 0
3 years ago
Read 2 more answers
Other questions:
  • Is there such a thing as an ethical reason for unauthorized access into a computer system?
    15·1 answer
  • What can you achieve by selecting Insert in the Table menu?
    7·2 answers
  • You can display content variations to mobile, tablet or desktop users.
    12·1 answer
  • Cognitive psychology is the scientific study of what
    9·1 answer
  • Which Additional Authorization List item can replace the hook at the end of the winch cable for fastening the cable to some load
    12·1 answer
  • Janelle is at the store and can't decide whether to buy steak for dinner or bring home pizza. To get a quick response from her p
    13·1 answer
  • What is a technological advancement that is now being used in tractors throughout America?
    6·2 answers
  • What is the name of the function below?<br><br> function go(){<br> alert("hello everybody");<br> }
    10·1 answer
  • I need a solution for this problem asap.
    7·1 answer
  • Given the following class, Book, Write code for the following:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!