When I run this program it shows erron in line 4.
Show older comments
n = input("ENTER A NUMBER "); flag = 0 ; for i=1:n if (modulo(n,i)==0) then flag = flag+1 ; end end if (flag==2)then disp("this is a prime number "); else disp("this is not prime ."); end
Accepted Answer
More Answers (0)
Categories
Find more on Discrete Math in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!