Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions

Question

=+1 Where are the best places in the world to live (and work)?

Answered: 1 week ago

Question

=+Are you interested in working on global teams?

Answered: 1 week ago

Question

=+Do you want to work from home?

Answered: 1 week ago