basic programming
find sum of an average of first 20 odd numbers
Answers
Answered by
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
Social Sciences,
3 hours ago
Computer Science,
3 hours ago
Psychology,
3 hours ago
Chemistry,
6 hours ago
Math,
6 hours ago
English,
8 months ago