What is the output of the following program segment? (2) double list[5]; for (int i = 0; i     list[i] = pow(i, 3) + i / 2.0; cout for (int i = 0; i     cout list[0] = list[4] - list[2];  list[2]...


What is the output of the following program segment? (2)


double list[5];


for (int i = 0; i <>


    list[i] = pow(i, 3) + i / 2.0;


cout <><>


for (int i = 0; i <>


    cout <><>


list[0] = list[4] - list[2];


 list[2] = list[3] + list[1];


for (int i = 0; i <>


    cout <><>


What is the output of the following C++ code?  (2)


int alpha[8];


for (int i = 0; i <>


 {


    alpha[i] = i * (i + 1);


    if (i % 2 == 0)


        alpha[4 + i] = alpha[i] + i;


    else if (i % 3 == 0)


        alpha[4 + i] = alpha[i] - i;


    else if (i > 0)


        alpha[4 + i] = alpha[i] - alpha[i - 1];


}


for (int i = 0; i <>


    cout <><>




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here