Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code below is an example shown in class last week. What happens when the 'continue' command is executed ( that is , if (

The code below is an example shown in class last week.
What happens when the 'continue' command is executed (that is, if (r==0) is true)?
n=10;
a=zeros(n+1,n+1);
for r =0:n
for c =0:n
if ((r+c)==0)
break;
end
a(r+1,c+1)=1/(r+c);
end
if (r==0)
continue;
end
a(r+4,r+4)=10;
end
Group of answer choices
Nothing happens at all
The loop on c immediately goes to the next iteration, that is, with c=1
The entire loop on c is stopped, and the next iteration of the for loop on r starts with r=1
The command a(r+4,c+4)=10; gets executed with r=0 and c=0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions