1 num = 0 2 while num < 100: 3 num += 1 4 if (num % 2) == 0: 5 print(num) 转载于:https://www.cnblogs.com/seperinna/p/9506505.html