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
weeeeeb [17]
3 years ago
14

9.19 LAB: Sort an array Write a program that gets a list of integers from input, and outputs the integers in ascending order (lo

west to highest). The first 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:
Computers and Technology
1 answer:
Zolol [24]3 years ago
7 0

Answer:

i hope you understand

mark me brainlist

Explanation:

Explanation:

#include <iostream>

#include <vector>

using namespace std;

void vector_sort(vector<int> &vec) {

int i, j, temp;

for (i = 0; i < vec.size(); ++i) {

for (j = 0; j < vec.size() - 1; ++j) {

if (vec[j] > vec[j + 1]) {

temp = vec[j];

vec[j] = vec[j + 1];

vec[j + 1] = temp;

}

}

}

}

int main() {

int size, n;

vector<int> v;

cin >> size;

for (int i = 0; i < size; ++i) {

cin >> n;

v.push_back(n);

}

vector_sort(v);

for (int i = 0; i < size; ++i) {

cout << v[i] << " ";

}

cout << endl;

return 0;

}

You might be interested in
This describes what is charted. It can be placed above or below the chart.
Tems11 [23]

Answer:

a . chart area

This describes what is charted. It can be placed above or below the chart.

Explanation:

3 0
3 years ago
The best way to share criticism is to ______. a. write it in the break room b. talk it about with all your coworkers c. talk abo
ICE Princess25 [194]

Answer:

C.

Explanation:

6 0
4 years ago
Read 2 more answers
A firewall can consist of all devices positioned on the network _____________.
ale4655 [162]

Answer:

The answer to this question is "perimeter".

Explanation:

In computer science, the firewall is used to provide a network security system that manages network traffic like incoming and outgoing signals. This traffics is based on predetermined security rules. The firewall typically installs a boundary between a trusted inner network and an untrusted outer network, such as the Internet. It is a software concept and Perimeter firewalls manage the flow of network traffic and host or organization's border the boundary that provides the first line of security against outer attacks and blocking access to inappropriate content from inside an organization.

6 0
4 years ago
File names should describe what is in the file in a few words
JulijaS [17]

Answer

File names should describe the content of the file.

Explanation

File names are set of words  which are used to uniquely identify computer files which are stored in a file system. This helps one to know the contents of the file which you want to find. When you name these file names you use necessary characters you use descriptive words so that you dont have hard times when searching for them. The naming also is determined by the file system you are using because different systems impose different restrictions on the length of the file names and the allowed characters within file names.

3 0
3 years ago
The georgia _______________ law encourages people to help others in emergency situations and protect people who offered reasonab
Naddik [55]

The Georgia Good Samaritan law encourages people to help others in emergency situations and protect people who offered reasonable help.

3 0
4 years ago
Other questions:
  • *asap* Name one of the similarities between Word and Excel.
    7·1 answer
  • Open source software is copyrighted software that is distributed at no cost for a trial period.
    11·1 answer
  • Annie needs to provide a form field that will allow users to select from a predefined list of options but without the ability to
    8·1 answer
  • Vhich economic impact of computers was mentioned in this lesson?
    6·1 answer
  • doubleIt is a function that takes one argument and returns no value . The argument is a pointer to int . The function doubles th
    9·1 answer
  • Hydraulic systems use liquids because _____.
    14·2 answers
  • This is for being Weird!
    15·2 answers
  • Importance of computer​
    15·1 answer
  • Assume the user responds with a 3 for the first number and a 5 for the second number.
    13·1 answer
  • What were the names of Henry VIII's six wives?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!