Determine the output for each part below by hand (do not compile the programs).
ID: 652589 • Letter: D
Question
Determine the output for each part below by hand (do not compile the programs).
Part A
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 0; i < R; i++)
{ for (int j = 0; j < C; j++)
cout << setw(3) << A[i][j];
cout << endl; }
Part B
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 1; i < R; i++)
{ for (int j = 1; j < C; j++)
cout << setw(3) << A[i][j];
cout << endl; }
Part C
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int j = 0; j < C; j++)
{ for (int i = 0; i < R; i++)
cout << setw(3) << A[i][j];
cout << endl; }
Part D
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = R-1; i >= 0; i--)
{ for (int j = C-1; j >= 0; j--)
cout << setw(3) << A[i][j];
cout << endl; }
Part E
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 0; i < R; i++)
{ for (int j = 0; j < i+1; j++)
cout << setw(3) << A[i][j];
cout << endl; }
Part F
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 0; i < R; i++)
{ for (int j = 0; j < C; j++)
if(i>=j)cout<<setw(3)<<A[i][j];
cout << endl; }
Part G
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = R-1; i >= 0; i--)
{ for (int j = 0; j < C; j++)
cout << setw(3) << A[i][j];
cout << endl; }
Part H
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 0; i < R; i++)
{ for (int j = C-1; j >=0; j--)
cout << setw(3) << A[i][j];
cout << endl; }
Part A
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 0; i < R; i++)
{ for (int j = 0; j < C; j++)
cout << setw(3) << A[i][j];
cout << endl; }
Part B
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 1; i < R; i++)
{ for (int j = 1; j < C; j++)
cout << setw(3) << A[i][j];
cout << endl; }
Part C
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int j = 0; j < C; j++)
{ for (int i = 0; i < R; i++)
cout << setw(3) << A[i][j];
cout << endl; }
Part D
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = R-1; i >= 0; i--)
{ for (int j = C-1; j >= 0; j--)
cout << setw(3) << A[i][j];
cout << endl; }
Part E
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 0; i < R; i++)
{ for (int j = 0; j < i+1; j++)
cout << setw(3) << A[i][j];
cout << endl; }
Part F
const int R = 4, C = 3;
double A[R][C]={1,2,3,4,5,6,7,8,9,10,11,12};
for (int i = 0; i < R; i++)
{ for (int j = 0; j < C; j++)
if(i>=j)cout<<setw(3)<<A[i][j];
cout << endl; }
Explanation / Answer
PART
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.