python-CSD-kursu/python-temel/odd.total.py

9 lines
107 B
Python
Raw Normal View History

2023-05-20 18:51:31 +03:00
n = int(input('Bir sayı giriniz:'))
total = 0
for i in range(1, n + 1, 2):
total += i
print(total)