Sum multiples of 3 and 5: Difference between revisions
Content added Content deleted
mNo edit summary |
|||
Line 968: | Line 968: | ||
for N:= 1 to 999 do |
for N:= 1 to 999 do |
||
if rem(N/3)=0 or rem(N/5)=0 then S:= S+N; |
if rem(N/3)=0 or rem(N/5)=0 then S:= S+N; |
||
return S; |
|||
]; |
]; |
||
Line 977: | Line 978: | ||
]; |
]; |
||
⚫ | |||
func Sum3(D); \Return sum of sequence for really big number |
func Sum3(D); \Return sum of sequence for really big number |
||
⚫ | |||
int D; \divisor |
int D; \divisor |
||
int I; |
int I; |