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

Hello! I need to write a very simple c++ program that does the following and I c

ID: 3570025 • Letter: H

Question

Hello! I need to write a very simple c++ program that does the following and I cannot figure out the logic:

so I have an array, size [4][4]. let's call it array[4][4]. I need to fill up all of it's elements with EVERY POSSIBLE COMBINATION of numbers 1-4.

For example:

0 0 0

0 0 0

0 0 1

then

0 0 0

0 0 0

0 0 2

but when the last spot gets to 4, it resets to zero then we'll see

0 0 0

0 0 0

0 1 0

then it keeps going

0 0 0

0 0 0

0 1 1

I hope you can follow, eventually the final output, way later, will look like:

4 4 4

4 4 4

4 4 4

Explanation / Answer

#define col 50 #include #include void main() { void data_entry_matrix(int,int); clrscr(); coutrows; coutcols; data_entry_matrix(rows,cols); getch(); } void data_entry_matrix(int r, int c) { clrscr(); int matrix[row][col]; for(int i=0;imatrix[i][j]; } } }
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