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
Get step-by-step solutions from verified subject matter experts
