Computer Science, asked by sikha006, 6 hours ago

basic programming
find sum of an average of first 20 odd numbers​

Answers

Answered by parvathyv362
1

Explanation:

First let's see the math behind it.

We have 1,3,5,7

So this is Arithmetic progression with

a =1; d =2

Let's denote sum of this numbers be S

So after applying formula of first n numbers

S = n/2[2a+(n-1)d]

S = n/2[2+2n-2]

S = n^2

Hence sum of first 10 odd numbers will be 10^2 = 100 (I think coding this is much simpler)

Similar questions