38.2k views
3 votes
Assume that plist refers to a list containing exactly five elements. Assume, in addition, that j refers to an int with a value that is between 0 and 3. Write a statement that associates a new value with the element of the list indexed by j. This new value should be equal to twice the value of the next element of the list (i.e. the element after the element indexed by j).

User DavidRguez
by
7.2k points

1 Answer

2 votes

Answer:

The following statement is that:

plist[j]= 2*plist[j+1]

Step-by-step explanation:

Here, we assume that a variable "plist" containing five elements and in addition with an integer variable "j" between 0 to 3. then we take plist[j] and multiply by 2 and increase the value of variable "j" and save it in plist[j] and we take input at the integer variable j.

User Vanarajcs
by
6.9k points