Ответ:
n = int(input('Введите число: '))
even = 0
k = 2
while (k <= n):
if (k % 2 == 0):
even = even + k
k = k + 2
else:
k = k + 1
print(even)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
n = int(input('Введите число: '))
even = 0
k = 2
while (k <= n):
if (k % 2 == 0):
even = even + k
k = k + 2
else:
k = k + 1
print(even)