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.
Find the two most distant points
1644 Solvers
521 Solvers
Sum the elements in either diagonal of a square matrix
180 Solvers
262 Solvers
Find out total non zero element of matrix
196 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!