Asked by Nabeena
C programming series of
1,3,6,11,19,31.....10th term
1,3,6,11,19,31.....10th term
Answers
Answered by
oobleck
Hmmm. The differences are
2,3,5,8,12, ...
1,2,3,4,...
So using C syntax, code up the loop
s=1
d1 = 1
d2 = 0
for i=1..10 {
if i > 1 {d1 += d2}
d2++
s += d1+d2
}
2,3,5,8,12, ...
1,2,3,4,...
So using C syntax, code up the loop
s=1
d1 = 1
d2 = 0
for i=1..10 {
if i > 1 {d1 += d2}
d2++
s += d1+d2
}
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.