Write a program to find the sum of 1st 10 even natural numbers.
Answers
Answered by
0
Explanation:
Sum=0
For i in range(1,11):
Sum=Sum+(2*i)
Print(Sum)
Or simpler way
Sum=n*(n+1)
Print(Sum)
Answered by
2
Explanation:
python
if ( i % 2 == 0) :
for i in range ( 0 , 21) :
sum += I
print ( sum)
Similar questions