We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fee3954 + b2c41ad commit 47089ceCopy full SHA for 47089ce
sum of even number
@@ -0,0 +1,9 @@
1
+maximum = int(input(" Please Enter the Maximum Value : "))
2
+total = 0
3
+
4
+for number in range(1, maximum+1):
5
+ if(number % 2 == 0):
6
+ print("{0}".format(number))
7
+ total = total + number
8
9
+print("The Sum of Even Numbers from 1 to {0} = {1}".format(number, total))
0 commit comments