When I run this program it shows erron in line 4.
16 views (last 30 days)
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
0 Comments
Accepted Answer
More Answers (0)
See Also
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!