If i were given the following array numbers with the corresponding values:

index:0 1 2 3 4 5 6 7 8

value:1 3 5 7 9 11 13 15 17

how would I calculate using the following loop

for(int i=0; i<9; i++)

{

numbers[i] = numbers[i] * 2 + i;

}

and what would the outcomes be?

index:0 1 2 3 4 5 6 7 8

value:1 3 5 7 9 11 13 15 17

how would I calculate using the following loop

for(int i=0; i<9; i++)

{

numbers[i] = numbers[i] * 2 + i;

}

and what would the outcomes be?

Topic archived. No new replies allowed.