Question: Make function called loopTest(N) that loops through the values 1 through N and for each number n it should display 'n' is Not divisible 2

Make function called loopTest(N) that loops through the values 1 through N and for each number n it should display 'n' is Not divisible 2 or 3'. Use a for loop , the function mod or rem to figure out if a number divisible by 2 or 3, and num2str to convert each number to a string for displaying. You can use any combination of if,else, and elseif.

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!