Sum of Even Numbers

PHOTO EMBED

Sat Nov 05 2022 02:43:36 GMT+0000 (Coordinated Universal Time)

Saved by @codewithakash

num = int(input())
i = 1
sum = 0
while (i <= num):
    if (i % 2 == 0):
       sum = sum + 1
    i = i + 1
print("Sum of even Num: ",sum)
content_copyCOPY

Take any input from user and find the sum of even numbers.