Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Prime Number Finder ( basic input processing, datatype control ) My Soluti Write a function named primeFinder that accepts a two - element vector of
Prime Number Finder basic input processing, datatype control
My Soluti
Write a function named primeFinder that accepts a twoelement vector of distinct positive integer values and finds all the prime numbers that lie between them. Your function should have two output arguments:
A column vector of all the primenumbers that lie between the two inputs.
A scalar that counts the number of elements in the first output.
The two values in the input vector may not be in ascending order. You might find the function primes helpful.
Note the function command is given in line with suggested names for the input and output variables. You can change the names but not the order of these variables if you like. Do not change the name of the function, however, as this exact name is required for the tests to run. Be sure to assign a value to the output variable.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started