Find max prime number - MATLAB Cody - MATLAB Central

Problem 43142. Find max prime number

Difficulty:Rate

Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example:

n = 10
--> mpn = 7 

Solution Stats

58.72% Correct | 41.28% Incorrect
Last Solution submitted on Mar 05, 2025

Problem Comments

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
3
5

Problem Recent Solvers182

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page