Primes(x) and isPrime(x) are not allowed for this question. fprintf should be used. I was thinking of using a while loop with maybe a for and/or if's inside. I am new to MATLAB so any help would be appreciated. Thanks!
MATLAB: How to write a program that can display the first 50 consecutive prime numbers starting with 2
homeworkprime numbers
Related Question
- I wrote a code to produce twin primes, however it is pretty strenuous for the computer and I need some high numbers to check a conjecture. Is there a better way to get twin primes. Note: these twin primes are represented by 6m’s where 6m+-1 are pri
- How to find prime numbers
- How to find prime numbers by using mod function
- How to print the first 100 primes including 1 as a vector
- How to make the code run faster
Best Answer