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 listing columns in the select list, what should you use to separate the columns?
Gala2k [10]
The answer is commas.  <span>When listing columns in the select list, commas should be used to separate the columns.</span>
6 0
3 years ago
What does "CPU" stand for?
sergiy2304 [10]
Central Processing Unit
8 0
3 years ago
Read 2 more answers
You work as a Network Administrator for wwwpany Inc. You have suspected a bad driver or perhaps malware. Which of the following
vichka [17]

Answer:

Explanation:

There is a solution called ETA (Encrypted Traffic Analytics) this is a security advanced network that helps us to identify malware between the encrypted data, but with this tool is no necessary to break any protection and privacy chain.

This technology use machine learning to read all the traffic without deciphering it, in this way we can detect a difference between reliable and malicious traffic.

En windows we can use Microsoft Security Essentials like antivirus and detect virus, we can use Process Explorer, analyze the traffic, we can use Microsoft Network Monitor.

8 0
3 years ago
Write an algorithm to find the area of a parallelogram​
xeze [42]

Answer:

a = bh

Explanation:

a = Area
b = Base

h = Height

8 0
3 years ago
8. SQL, Oracle Report, and Visual Basic are all examples under the
sleet_krkn [62]

SQL, Oracle Report, and Visual Basic are all examples under the generation.

<h3>Fourth generation languages</h3>

Fourth-generation programming language (4GL) are computer programming language based on the advancement on third-generation programming languages (3GL).

4GLs may include support for <em>database management, report generation, mathematical optimization, GUI development, web development.</em>

SQL, Oracle Report, and Visual Basic are all examples under the generation.

Find out more on Fourth generation languages at: brainly.com/question/9325849

3 0
2 years ago
Other questions:
  • Annabella was giving a presentation to a group of 20 real estate agents on
    15·2 answers
  • What does a professional programmer usually do first to gain an understanding of a problem?
    12·2 answers
  • Which option is used to apply formatting to multiple objects on a single slide while still maintaining the ability to manage the
    14·2 answers
  • Read the scenario below and then answer the
    14·1 answer
  • WRITE A JAVA PROGRAM TO PRINT THE PATTERN<br> 13579<br> 2468<br> 357<br> 46<br> 5
    12·1 answer
  • There is a renewed focus among today’s parents on providing food to their family.
    6·1 answer
  • Who like the videos where is clown is from :)
    6·1 answer
  • I need names for an anime and powers so plz make then unique
    14·1 answer
  • What are the uses of computer in educational setting?
    5·2 answers
  • The users, groups, and roles that have access to a server are called ______________________________.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!