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
natka813 [3]
3 years ago
9

Write a void function SelectionSortDescendTrace() that takes an integer array, and sorts the array into descending order. The fu

nction should use nested loops and output the array after each iteration of the outer loop, thus outputting the array N-1 times (where N is the size). Complete main() to read in a list of up to 10 positive integers (ending in -1) and then call the SelectionSortDescendTrace() function.
If the input is:

20 10 30 40 -1
then the output is:

40 10 30 20
40 30 10 20
40 30 20 10
Computers and Technology
1 answer:
salantis [7]3 years ago
8 0

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

void SelectionSortDescendTrace(int numbers[], int numElems) {

int maxInd;

for (int i = 0; i < numElems - 1; ++i) {

maxInd = i;

for (int j = i; j < numElems; ++j) {

if (numbers[j] > numbers[maxInd]) {

maxInd = j;

}

}

int temp = numbers[i];

numbers[i] = numbers[maxInd];

numbers[maxInd] = temp;

for (int j = 0; j < numElems; j++) {

cout << numbers[j] << " ";

}

cout << endl;

}

}

int main() {

int numbers[10];

int numElements = 0;

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

cin >> numbers[i];

if (numbers[i] == -1)

break;

++numElements;

}

SelectionSortDescendTrace(numbers, numElements);

return 0;

}

You might be interested in
In a DTP project, Fiona is looking for a way to make a page layout attractive to readers. Help Fiona pick the correct word to co
Jlenok [28]

You’ll need a(n)  a block of bold text to capture the attention of your audience.

<h3>How do you make text bold in pages?</h3>

First one need to select Format  and then Font and then Bold.

Note that  by bolding a selected text, it can capture the mind of the people to the page layout.

Hence, You’ll need a(n)  a block of bold text to capture the attention of your audience.

Learn more about  page layout  from

brainly.com/question/12129748

#SPJ1

8 0
2 years ago
(True/False) Utilizing a higher bandwidth can support a larger volume of data (in bits per second) to be transmitted than a lowe
lions [1.4K]

Answer:

True

Explanation:

Bandwidth refers to the maximum data transfer rate across the communication media it refers to the amount of information sent for unit time and it's not related to the speed at which data is transferred (latency) but rather the amount of information. As an analogy imagine a full-pipe, the width of the pipe is related to the amount of water per unit time across the pipe (bandwidth).

3 0
3 years ago
Read 2 more answers
HELP ME PLEASE
MAXImum [283]

Explanation:

Threats

Computer Security Threats are possible dangers that can affect the smooth functioning of your PC. These may be a small piece of adware or a harmful Trojan malware. In the present age, computer security threats are constantly increasing as the world is going digital. computer security threats

Types of Computer Security Threats

There are several types of computer security threats such as Trojans, Virus, Adware, Malware, Rootkit, hackers and much more. Check some of the most harmful types of computer Security Threats.

COMPUTER VIRUS

A Computer Virus is a malicious program, which replicates itself and infects the files and programs of your PC and can make them non-functional.

COMPUTER WORMS

A self-replicating computer program that spreads malicious codes, computer worms make use of the network to send copies of the original codes to other PCS. It can also go to the extent of sending transferring documents utilizing the email of the user.

SCAREWARE

Scareware is a malware that tricks victims to buy software by displaying fake virus alerts. A scareware infected PC may get pop-ups of fake malware threats and to get rid of those, users are prompted to purchase a fake anti-malware software.

KEYLOGGER

Also known as a keystroke logger, Keyloggers can track the real-time activity of a user on his computer. Keylogger runs in the background and records all keystrokes made by a user and passes the information to the hacker with the motive to steal password and banking details.

ROOTKIT

A rootkit is considered extremely dangerous as they appear to be legitimate files and deceives the computer user. Rootkit masks viruses and worms and makes them appear as necessary files. These are very difficult to remove and only an antivirus with the anti-rootkit feature can remove a rootkit.

Tips for Best Computer Security

For best computer security, you must follow certain guidelines, which are also called computer best practices. 1. Use the best antivirus software, which not only provides protection to your PC but also internet protection and guards against cyber threats. 2. Do not download untrusted email attachments and these may carry harmful malware. 3. Never download software from unreliable sites as they may come with a virus that may infect your system as soon as you install the software.

4 0
2 years ago
Which of the following does not use a Graphic User Interface?
meriva

UNIX is operating system has no graphics user interface

Unix

<u>Explanation:</u>

Mostly nowadays all operating system and software is coming at graphics user interface. End user what all are visual interfaces by using mouse as input tools.

Since computer world is changes technology every day mouse and graphics user interfaces. In old days where operating system are operated in black and white screen period main use of input device are keyboard and those days are no graphic user interface.

In fact nowadays we going back to black and white screen and we name it as dark mode and say to save current and save eyes. But still use mouse as input tools in dark mode also.

3 0
3 years ago
The First Web page you will see every time you launch the Web Browser Application is called​
sineoko [7]

Answer:

HomePage

Explanation:

3 0
3 years ago
Other questions:
  • How do i connect wifi direct from pc to phone​
    15·1 answer
  • Create a class CitiesAndCountries with at least three methods: class CitiesAndCountries: def add_country(self, country_name): ""
    7·1 answer
  • What is the code for loading image in matlab
    15·1 answer
  • To select a new theme for a slideshow use the blank tile in the ribbon
    9·2 answers
  • You notice that it’s very easy to confuse medications at the community health center where you’re working. They are lined up on
    10·1 answer
  • The work day has just started and you receive reports that the inventory management server is not accessible on your company's n
    7·1 answer
  • How to make all cells the same size in excel?
    15·1 answer
  • Which changes the natural world? <br> technology <br> science <br> prototypes <br> feedback
    5·1 answer
  • 2.3 Code Practice: Question 1
    5·1 answer
  • Passing an argument by ___ means that only a copy of the arguments value is passed into the parameter variable and not the addrt
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!