Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This program was designed to be made in labview but i am kind of confused on wha

ID: 3746312 • Letter: T

Question

This program was designed to be made in labview but i am kind of confused on what it is asking of me

1: using two nested for loops, create a program that builds a two dimensional array with 10 rows of 5 columns. 2: make the contents of each element indicate the column (ones digit) and row (tens digit) 3: wire the output to an indicator and expand the indicator to show all of the elements. Take the quiz when you are done Question 1 1 pts The default behavior of a pass through in a for loop is: O Return a the last value of the loop. O Return a value for each iteration O Return the last value of the last iteration Return the first value of each iteration. Question 2 1 pts The program used to create the two D array required an auto index only on the output of the outer loop True False

Explanation / Answer

Question1:

Return a value for each iteration

Question2:

False

We need auto indexing in both loops(inner and outer)

C++ Code:

#include <iostream>

using namespace std;

int main() {

                int twoD[10][5];

                int i, j;

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

                                for(j=0; j<5; j++)

                                                twoD[i][j] = 10*i + j;

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

                {

                                for(j=0; j<5; j++)

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

                                cout<<endl;

                }

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote