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 FalseExplanation / 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;
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.