Hello, how do I create a 4x4 matrix with numbers 1<16 ?

Thank you for the opportunity to help you with your question!

To create a matrix with 4*4 on programming should you use an 2 dimension array :

exemple in C++ ;

int Matrix[4][4];

to full this matrix you need to use a loop like :

for(int i=0;i<4;i++){

for(int j=0;j<4;j++){

printf("put number < 16 : ");

scanf("%d",&Matrix[i][j]);

}

if you want to show this matrix you can use this code :

printf(Matrix[i][j]);

========

if you don't understand something please just ask

Each time you have any other assignment or question just invite me i will give you the best answer

Good Luck

Secure Information

Content will be erased after question is completed.

Enter the email address associated with your account, and we will email you a link to reset your password.

Forgot your password?

Sign Up