Untitled
unknown
python
2 years ago
153 B
3
Indexable
n = int(input())
def tinh_tong_while(n):
i = 1
sum = 0
while i < n+1:
sum = sum + i
i = i +1
return sum
print(tinh_tong_while(n))Editor is loading...
Leave a Comment
n = int(input())
def tinh_tong_while(n):
i = 1
sum = 0
while i < n+1:
sum = sum + i
i = i +1
return sum
print(tinh_tong_while(n))