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.

83 correct solutions
127 incorrect solutions

Last solution submitted on Aug 23, 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