language: Lua (luac 5.1.4)
date: 109 days 12 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local i, j, sum
sum = 0
for i = 1, 10000, 1 do
        j = 1
        sum = 0
 
        while j<=i/2 do
        if(i%j==0)
            sum=sum+j;
        end
     
        end
        if(sum==i) then
print(i)
end
end
luac: prog.lua:9: 'then' expected near 'sum'