[ create a new paste ] login | about

Link: http://codepad.org/afUvYHnm    [ raw code | output | fork ]

Lua, pasted on Jul 7:
1
2
3
4
5
6
7
8
9
10
m = 2
n = 20
s=0
for i=m,n,1 do
if i%2~=0 or i==2 and i%3~=0 or i==3 and i%5~=0 or i==5 and i%7~=0 or i==7 and i%11~=0 or i==11 then
s=s+i
print(i)
end
end
print(s)


Output:
1
2
3
4
5
6
7
8
9
10
11
2
3
5
7
9
11
13
15
17
19
101


Create a new paste based on this one


Comments: