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.
1 parent ce7d8a2 commit b2c41adCopy full SHA for b2c41ad
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