Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (26 sloc) 722 Bytes
# Prints the sum of all the multiples of 3 or 5 below 1000
# by Martin del Rio
# Created for LDPL 1.0
result is number
i is number
remainder3 is number
remainder5 is number
remainder is number
sub-procedure is-multiple-of
modulo i by 3 in remainder3
modulo i by 5 in remainder5
in remainder solve remainder3 * remainder5
if remainder is equal to 0 then
in result solve result + i
end if
end sub-procedure
store 0 in i
store 0 in result
while i is less than 1000 do
call sub-procedure is-multiple-of
in i solve i + 1
display result crlf
You can’t perform that action at this time.