Nice test cases!
With a more robust Test Suite many/most of the submissions would fail for ignoring the Problem Statement instruction that primes must be less than n. Please add test cases in which the input x (or "n") is itself a prime.
How to find the position of an element in a vector without using the find function
2477 Solvers
Try 1.5.4: Celsius to Fahrenheit
609 Solvers
find the maximum element of the matrix
349 Solvers
07 - Common functions and indexing 4
319 Solvers
202 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!