输出 1-100 内的所有奇数

 1 方法一:
 2  count = 1
 3  while count < 101:
 4      print(count)
 5      count += 2
 6 方法二:
 7  count = 1
 8  while count < 101:
 9      if count % 2 == 1:
10          print(count)
11      count += 1

 

posted @ 2018-10-16 00:06  梦潇幻影  阅读(229)  评论(0)    收藏  举报