for i in range(5): print(i)
i = 0 while i < 5: print(i) i += 1
n = 0 total = 0 while n < 10: total += n n += 1 print(total)
n = 1 while n <= 10: if n % 2 == 0: print(n) n += 1
标签: 算法