Computer Science, asked by sumana2001, 1 year ago

Find sum of all multiple of 3 and 7 between 1 to 100 using 1 loop in c++

Answers

Answered by rikshitha
0
The previously posted answer isn't correct. The statement of the problem is to sum the multiples of 3 and 7 below 1000, not up to and equal 1000. The correct answer isk1=13333k1+k2=11995k2k3=16615k3=166833+99500−33165=233168,k1=13333k1+k2=11995k2k3=16615k3=166833+99500−33165=233168,where we have the used the identityk=1nk=12n(n+1).
Similar questions