I have a loop problem im stuck on Which of the following loops would adequately
ID: 3618601 • Letter: I
Question
I have a loop problem im stuck onWhich of the following loops would adequately add 1 to eachelement stored in values?
a. for(j=1; j<values.length-1;j++) values[j]++; b. for(j=0; j<values.length1;j++) values[j]++; c. for(j=1; j<values.length1;j++) values[j]++; d. for(j=0; j<values.length-1;j++) values[j]++; e. for(j=0; j<=values.length1;j++) values[j]++;
Which of the following loops would adequately add 1 to eachelement stored in values?
a. for(j=1; j<values.length-1;j++) values[j]++; b. for(j=0; j<values.length1;j++) values[j]++; c. for(j=1; j<values.length1;j++) values[j]++; d. for(j=0; j<values.length-1;j++) values[j]++; e. for(j=0; j<=values.length1;j++) values[j]++;