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
andreyandreev [35.5K]
3 years ago
5

Write a program that gets a list of integers from input, and outputs the integers in ascending order (lowest to highest). The fi

rst integer indicates how many numbers are in the list. Assume that the list will always contain less than 20 integers.Ex: If the input is 5 10 4 39 12 2, the output is: 2 4 10 12 39Your program must define and call the following method. When the SortArray method is complete, the array passed in as the parameter should be sorted.
Computers and Technology
1 answer:
Travka [436]3 years ago
5 0

Answer:

Explanation:

Since no programming language is stated, I'll use Microsoft Visual C# in answering this question.

// C# program sort an array in ascending order

using System;

class SortingArray {

int n; //number of array elements

int [] numbers; //Array declaration

public static void Main() {

n = Convert.ToInt32(Console.ReadLine());

numbers = new int[n];

for(int i = 0; i<n; I++)

{

numbers [n] = Convert.ToInt32(Console.ReadLine());

}

SortArray();

foreach(int value in numbers)

{

Console.Write(value + " ");

}

}

void SortArray()

{

int temp;

// traverse 0 to array length

for (int i = 0; i < numbers.Length - 1; i++)

// traverse i+1 to array length

for (int j = i + 1; j < numbers.Length; j++){

// compare array element with all next element

if (numbers[i] < numbers[j])

{

temp = numbers[i];

numbers[i] = numbers[j];

numbers[j] = temp;

}

}

}

You might be interested in
When it comes to the best possible security for your wireless router, be sure to use WEP encryption to ensure that your transmis
Usimov [2.4K]

Answer:

The correct answer to the following question will be "False".

Explanation:

  • Data equivalent protection for Wired Equivalent Privacy (WEP) is an older authentication and data encryption mode that was replaced with better authentication methods for WPA-PSK and WPA2-PSK and data encryption.
  • Only when you select Up to 54 Mbps from the Mode menu will the WEP option appear.
  • WEP can easily be decoded that is why it is not good for secure transmissions.

Therefore, it's the right answer

8 0
3 years ago
A _____ defines what must take place, not how it will be accomplished.​
ddd [48]

This question is vauge, but through some searching I found an exact quote of this from the book "System Analysis and Design Tenth Edition" which states that this is known as Logical Design.

7 0
3 years ago
Drag each storage device to its category.
alexandr402 [8]

ROM: Secondary

HDD: Primary

RAM: Primary

DVD: Secondary

3 0
3 years ago
Write is an I.P.O cycle? Describe with figure​
lord [1]

Answer:

IPO refers to Input, Output and Process. As the title suggests, the IPO cycle is the input & output after the process of the information. People must give input first to get output, and then the input must be processed to get the desired outcome

7 0
3 years ago
All of the following are challenges presented by changing technology as it relates to the special events field EXCEPT: A. the ab
mel-nik [20]

Answer:

The answer is "option C".

Explanation:

The change in technology can be characterized as that of an increase in the production feasible thru the innovations, new technologies, and dispersion procedures at a specified amount of production. This technology concerns the Excluding area of special events, even if it needs the new master software and applications continuously, and the wrong choices can be defined as follows:

  • In choice A, it is a part of event management that's why it is wrong.
  • In choice B it is wrong because it is used in learning.
  • In choice D, it is wrong because it is used to make progress.
4 0
3 years ago
Other questions:
  • Helllllp: Virtual private networks require a secure remote connection.<br> True or False?
    10·2 answers
  • What is computer ????
    11·1 answer
  • This measures how close a biometric reading is to a prerecorded template
    11·1 answer
  • Which statement most aptly defines the term networking?
    8·1 answer
  • Josh's boss asked him to write a letter to their customers explaining some upcoming price increases. But Josh was in a hurry to
    8·2 answers
  • Assume phrase= "Peter Piper picked a peck of pickled peppers", What will be returned if phrase.search(/[aeiou]/) is called?
    9·1 answer
  • When you touch a hot stove, along which pathway will the impulses travel and what is the final destination in the cns?
    12·1 answer
  • The printer prints 16 pages every minute. How many pages are printed in 6 minutes?
    14·2 answers
  • Identify what a computer needs to
    14·1 answer
  • Is a device used to test the network connection.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!