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
Gekata [30.6K]
1 year ago
13

Q5

Engineering
1 answer:
Klio2033 [76]1 year ago
5 0

The C++ code that would draw all the iterations in the selection sort process on the array is given below:

<h3>C++ Code</h3>

#include <stdio.h>

#include <stdlib.h>

int main() {

   int i, temp1, temp2;

   int string2[16] = { 0, 4, 2, 5, 1, 5, 6, 2, 6, 89, 21, 32, 31, 5, 32, 12 };

   _Bool check = 1;

   while (check) {

       temp1 = string2[i];

       temp2 = string2[i + 1];

       if (temp1 < temp2) {

           string2[i + 1] = temp1;

           string2[i] = temp2;

           i = 0;

       } else {

           i++;

           if (i = 15) {

               check = !check;

           }

       }

   }

   

   return 0;

}

Read more about C++ programming here:

brainly.com/question/20339175

#SPJ1

You might be interested in
Using the celsius_to_kelvin function as a guide, create a new function, changing the name to kelvin_to_celsius, and modifying th
aleksandr82 [10.1K]

Answer:

# kelvin_to_celsius function is defined

# it has value_kelvin as argument

def kelvin_to_celsius(value_kelvin):

   # value_celsius is initialized to 0.0

   value_celsius = 0.0

   

   # value_celsius is calculated by

   # subtracting 273.15 from value_kelvin

   value_celsius = value_kelvin - 273.15

   # value_celsius is returned

   return value_celsius

   

# celsius_to_kelvin function is defined

# it has value_celsius as argument

def celsius_to_kelvin(value_celsius):

   # value_kelvin is initialized to 0.0

   value_kelvin = 0.0

   

   # value_kelvin is calculated by

   # adding 273.15 to value_celsius

   value_kelvin = value_celsius + 273.15

   # value_kelvin is returned

   return value_kelvin

   

value_c = 0.0

value_k = 0.0

value_c = 10.0

# value_c = 10.0 is used to test the function celsius_to_kelvin

# the result is displayed

print(value_c, 'C is', celsius_to_kelvin(value_c), 'K')

value_k = 283.15

# value_k = 283.15 is used to test the function kelvin_to_celsius

# the result is displayed

print(value_k, 'is', kelvin_to_celsius(value_k), 'C')

Explanation:

Image of celsius_to_kelvin function used as guideline is attached

Image of program output is attached.

4 0
3 years ago
State three characteristic of lines of magnetic flux​
stepladder [879]

Answer:

1. The magnetic flux line form a closed loop.

2. The magnetic flux line repel each other.

3. The magnetic flux line never intersect.

5 0
2 years ago
Read 2 more answers
Stream Piracy – Kaaterskill, NY. Check and double-click the Problem 15 folder. The dark blue and orange streams highlight the pr
baherus [9]

Answer:

b. The pirating streams are eroding headwardly to intersect more of the other streams’ drainage basins, causing water to be diverted down their steeper gradients.

Explanation:

From the Kaaterskill NY 15 minute map (1906), this shows two classic examples of stream capture.

The Kaaterskill Creek flow down the east relatively steep slopes into the Hudson River Valley. While, the Gooseberry Creek is a low gradient stream flowing down the west direction which in turn drains the higher parts of the Catskills in this area.

However, there is Headward erosion of Kaaterskill Creek which resulted to the capture of part of the headwaters of Gooseberry Creek.

The evidence for this is the presence of "barbed" (enters at obtuse rather than acute angle) tributary which enters Kaaterskill Creek from South Lake which was once a part of the Gooseberry Creek drainage system.

It should be noted again, that there is drainage divide between the Gooseberry and Kaaterskill drainage systems (just to the left of the word Twilight) which is located in the center of the valley.

As it progresses, this divide will then move westward as Kaaterskill captures more and more of the Gooseberry system.

5 0
3 years ago
Can crushers help us recycle in a space efficient way which is good for saving the earth and for giving you more room in your ap
777dan777 [17]

Answer:

Force magnitude = 296.7 N

Explanation:

Detailed illustration is given in the attached document.

6 0
3 years ago
Discuss with your neighbor your brain as a computer.
Misha Larkins [42]
Senors are a type of device that produce a amount of change to the output to a known input stimulus.
Input signals are signals that receive data by the system and outputs the ones who are sent from it. Hope this helps ;)
6 0
3 years ago
Other questions:
  • A cylindrical specimen of a hypothetical metal alloy is stressed in compression. If its original and final diameters are 30.00 a
    14·1 answer
  • Suppose three companies, Optimax, Megachug, and Thirstoid, dominate the sports drink market. Optimax enjoys the largest market s
    9·1 answer
  • One kg of an idea gas is contained in one side of a well-insulated vessel at 800 kPa. The other side of the vessel is under vacu
    11·1 answer
  • Suppose that the voltage is reduced by 10 percent (to 90 VV). By what percentage is the power reduced? Assume that the resistanc
    10·1 answer
  • What should you use to turn the water off and open the door?
    7·2 answers
  • If 3 varies inversely as x and y=2 when x=25, find x when y=40
    7·1 answer
  • Underground water is to be pumped by a 78% efficient 5- kW submerged pump to a pool whose free surface is 30 m above the undergr
    10·1 answer
  • ____________ is the organization that oversees environmental compliance.
    14·1 answer
  • Is the pure fission bomb a nuclear bomb?
    5·1 answer
  • Who is the strongest avenger i say hulk but who knows at this point
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!