`n=input ('the num ');if n==1 ; disp('the num is prime ') breakelse for i=n:sqrt(n); if rem(n,i)==0; disp('the num is not prime ') else disp('the num is prime') end endend`

# MATLAB: I dont what is the problem in this simple program plz help distinguish prime numbers

help prime

###### Related Question

- I need a program to check prime numbers
- My professor assigned me to do the this homework with two numbers and writing a code that find which one is the prime for these two numbers
- How to display all prime numbers between two number input by user
- How to show non prime numbers (what is the contrari function of prime?)
- Finding positions and adding them together
- How to compare the strings inside the gui
- Calculating values from a sequence with a for loop

## Best Answer