使用while 循环输出100-50,从大到小,如100,99,98...,到50时再从0循环输出到50,然后结束;
a = 101 while a>50: a -= 1 print(a) a = -1 while a<50: a += 1 print(a)
原文地址:https://www.cnblogs.com/riling/p/10068835.html
时间: 2024-10-09 07:30:46
使用while 循环输出100-50,从大到小,如100,99,98...,到50时再从0循环输出到50,然后结束;
a = 101 while a>50: a -= 1 print(a) a = -1 while a<50: a += 1 print(a)
原文地址:https://www.cnblogs.com/riling/p/10068835.html