Question: All questions below refer to the array A={5,2,4,60,10,7}. 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,7}. 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 6
Question 1.
for(i=3; i print (A[i]+A[i-1]) Question 2. Convert for-loop into while-loop for Question 1 Question 3. for(i=0; i if(i>5 && i<10) print A[i] Question 4. for(i=0; i>5; i++) print A[i] Question 5. for(i=0; i>5; i++) { print A[i]; i=i-1; } Question 6. i=0; while(i A[i]=A[i]+1; for(i=0; i print A[i];
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
