Programming Examples
Python program to find the sum of first n even numbers
WAP to find the sum of first n even numbers.
Solution
n=int(input("Enter the Limit : "))
s=0
for i in range(0,n+1,2):
s=s+i
print("The sum is : ",s)
Output/ Explanation:
Enter the Limit : 20
The sum is : 110