EDIT . The question basically involves getting primes to a certain limit. An initial question follows.
I want my if become true if only these two conditions are true:
for i := 2; i <= 10; i++ { if i%i == 0 && i%1 == 0 { } else { } }
In this case, all possible numbers pass by these conditions, but I want only numbers 2, 3, 5, 7, 11 ... basically numbers that are divisible only by themselves and by 1 in order to pass, except being the very first " 2 ". How can i do this?
thanks
source share