+ 1
while loop
how to make, input: 10 output : 10 + 8 + 6 + 4 + 2 + 0 = 30 using while. please help😊😊. thanks
2 odpowiedzi
+ 2
i = int(input())
sum = 0
while i > 0:
sum += i
i -= 2
print(str(sum))
0
its output is an even number of inputs countdown until 0
thanks before