Question #52513

Create a nested for-loop script to iterate through all values of i=1:20 and j=1:20. Also start with a

running tally of total=0.

At each iteration, check the value of j. If j is divisible by 3, then do nothing and proceed to the next value of j. Next, if i x j is greater than 100, then stop processing the current j-based for-loop, and move on to the next value of i.

If both conditions have not been met, then add both i and j to the running tally called total. What is your final value for total at the end of your script? And how many times did MATLAB execute the break and continue statements in your program?

running tally of total=0.

At each iteration, check the value of j. If j is divisible by 3, then do nothing and proceed to the next value of j. Next, if i x j is greater than 100, then stop processing the current j-based for-loop, and move on to the next value of i.

If both conditions have not been met, then add both i and j to the running tally called total. What is your final value for total at the end of your script? And how many times did MATLAB execute the break and continue statements in your program?

Expert's answer

## Comments

## Leave a comment