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
kirill [66]
4 years ago
13

Assume that a two-dimensional rectangular array of integers called matrix has been declared with six rows and eight columns. Wri

te a for loop to exchange the contents of the second column with the fifth column.

Computers and Technology
1 answer:
IgorLugansk [536]4 years ago
4 0

Answer:

following are the program in C++ which is given below

Explanation:

following are the program in C++

#include <bits/stdc++.h>

using namespace std;

int main()  

{

int matrix[6][8]={{1,2,3,4,5,6,7,8},{9,10,11,12,13,14,15,16},{3,3,3,3,3,3,3,3},{4,4,4,4,4,4,4,4},{5,5,5,5,5,5,5,5},{6,6,6,6,6,6,6,6}};

cout<<"Matrix befor swapping:"<<endl;

for(int i=0;i<6;i++)

{

for(int j=0;j<8;j++)

{

cout<<matrix[i][j]<<" ";

}

cout<<endl;

}

for(int i=0;i<6;i++) //iterating over the loop

{

int temp=matrix[i][1];

matrix[i][1]=matrix[i][7];

matrix[i][7]=temp;

}

cout<<"Matrix After swapping:"<<endl;

for(int i=0;i<6;i++) //iterating over the loop

{

for(int j=0;j<8;j++)

{

cout<<matrix[i][j]<<" ";

}

cout<<endl;

Output

attachment are added for the above output.

following are the description of the program

1) read the matrix [i][j] by the user

2) in the loop we exchange the content of 2nd column with 5th column

You might be interested in
Which icon allows you to add a style to a chart
labwork [276]
Photo shop because you can add any thing or create any thing you want
4 0
3 years ago
Read 2 more answers
Explain what the hazard detection unit is doing during the 5th cycle of execution. Which registers are being compared? List all
kondaur [170]

Answer:

<em>The registers that are compared are instructions 3 and 4</em>

<em>Explanation:</em>

<em>From the question given,</em>

<em>Recall that we need to explain what the hazard detection unit is doing  during the 5th cycle of execution and which registers are being compared.</em>

<em>Now,</em>

<em>The instructions on the 5th cycle, at the stage ID/EX and IF/ID:</em>

<em>The instruction values are in ID/EX : sub $t2, $t3, $t6 (instruction 3)</em>

<em>The instruction values are in IF/ID: sub $t3, $t1 $t5 (instruction 4)</em>

<em>The register $t3 is compared in the instructions 3 and 4</em>

<em>The hazard detection unit between instruction 4 and 5t o be compared, it need to find out the values of $t1</em>

<em />

7 0
3 years ago
Iwhen using excel when is the best time to use the add paste special function ?
dem82 [27]
When pasting a graph in to the excel line or work or when passiting a cell to another cell.

6 0
3 years ago
Inputs should be blue colored font and should have ________ only. process and outputs should be in black colored font and have _
maksim [4K]

Inputs should be blue colored font and should have hardcoded numbers only,  and process and outputs should be in black colored font and have  formulas only.

<h3>What does input implies?</h3>

The term input is one that connote when a thing such as power or a  signal, is known to be put into any machine or system.

Note that Inputs should be blue colored font and should have hardcoded numbers only,  and process and outputs should be in black colored font and have  formulas only.

Learn more about Inputs from

brainly.com/question/20489800

#SPJ2

7 0
2 years ago
Identify the following keys. write AK for Alphanumeric keypad,NK for Numeric Keypad,CK for Cursor Key, FK for Function keys and
natali 33 [55]

Answer:need points for stuff

Explanation:

4 0
3 years ago
Other questions:
  • Joaquin is considering a career as an animator and wants to know more about the daily work of an average animator. Which strateg
    11·1 answer
  • Dani needs to present a mathematical formula to his audience. How should he start the process of adding an equation to a slide?
    5·1 answer
  • Write a function named enterNewPassword. This function takes no parameters. It prompts the user to enter a password until the en
    14·1 answer
  • In the context of social bookmarking, what does tagging allow you to do?
    5·2 answers
  • What are demographics? (with regards to marketing)
    11·1 answer
  • Martha and her project group want to present the class their work in the form of a slideshow that includes charts. Which applica
    9·1 answer
  • Assume variables SimpleWriter out and int n are already declared in each case. Write a while loop that printsA. All squares less
    11·1 answer
  • Create and configure databases in oracle database management system operation administration
    6·1 answer
  • I need trash talk for a comeback:
    11·2 answers
  • WILL MARK BRAINLIEST FOR ANYONES ANSWER!
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!