What is the error in the loop? I wrote this code to print the sum of the first 10 prime numbers, I already checked the loops but could not find the error. It was to print the sum of the cousins until 29 but only printed 2. Vlwzao o /
n=2
cont=0
soma=0
while n<=29 do
k=1
while k<=n do
if n%k==0 then
cont=cont+1
end
k=k+1
end
if cont==2 then
soma=soma+n
else soma=soma
end
n=n+1
end
print(soma)