Given a two-dimensional array of integers named q, with 2 rows and 4 columns, write some code that puts a zero in every element of q. Declare any variables needed to help you.
.
.
Click on the title for the solution
.
.
for (int i=0; i<2;i++)
for (int k=0; k<4; k++)
q[i][k]=0;
.
Click on the title for the solution
.
.
This is the answer:
:
for (int i=0; i<2;i++)
for (int k=0; k<4; k++)
q[i][k]=0;
Comments
Post a Comment