Question: All questions below refer to the array A={5,2,4,60,10). You need to provide an output for every pseudo-code. Variable size is of type int and stands

All questions below refer to the array A={5,2,4,60,10). You need to provide an output for every pseudo-code. Variable size is of type int and stands for the arrays length. Obviously, the size of A is 5

In addition, please convert every for-loop into equivalent while-loop.

I know size is not a command in C programming sizeof makes sense, but why add it to the i integer? adding size makes no sense, but I need to find a way to code these that will not make the program run efficiently in a for, and while loop. If someone can help me build the code I will appreciate it.

for(j=0; j

if (A[j]%4==0)

{

for(i=size-1, i>=0; i--)

print A[i]

}

}

next part of the question adds another portion that focuses on j.

for(j=0; j

if (A[j]%4==0)

{

for(i=0, i>size; i++)

A[i]=A[i]+A[i]

}

for(j=0; j

print A[[j]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!