Problem 42483. Give prime Numbers upto n
You are given a input number x; print all the prime numbers less than equal to x.
Solution Stats
Problem Comments
-
1 Comment
Guillaume
on 17 Sep 2015
Do not test for emptiness with isequal(x, []). Use isempty(x) instead
Solution Comments
Show commentsProblem Recent Solvers94
Suggested Problems
-
Project Euler: Problem 1, Multiples of 3 and 5
3381 Solvers
-
Find the sum of the elements in the "second" diagonal
1159 Solvers
-
07 - Common functions and indexing 1
439 Solvers
-
Test if a number is numeric or not
137 Solvers
-
Matrix of almost all zeros, except for main diagonal
184 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!