MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Find nearest prime number less than input number .

For example: if the input number is 125, then the nearest prime number which is less than this number is 113.

82 correct solutions
126 incorrect solutions

Last solution submitted on May 28, 2015

2 Comments

bainhome
on 24 Aug 2014

you still not change the wrong test suite:4.1 is not a prime.

Gareth Lee
on 30 Apr 2015

agree with bainhome

4 Comments