function primo = esPrimo(n) for i=2:n if mod(n,i)==0 break end end if i == n || n == 1 primo = true; else primo = false; end end