Question: 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

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!