157k views
2 votes
An vector of int named a that contains exactly five elements has already been declared and initialized. In addition, an int variable j has also been declared and initialized to a value somewhere between 0 and 3

User Dmitry
by
5.7k points

1 Answer

4 votes

Answer:

a[j] = 2*a[j+1];

Step-by-step explanation:

The statement above assigns a new value to the element of the array indexed by j. The new value should be equal to twice the value stored in the next element of the array.

User Kevin Buchs
by
5.2k points