Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Numerical Methods With Chemical Engineering Applications

Authors: Kevin D. Dorfman, Prodromos Daoutidis

1st Edition

1107135117, 978-1107135116

More Books

Students also viewed these Databases questions