count=0 for x in range(1,101): if x%2==0: print(x,end=' ') count+=1 print(f'\n{count}')
使用for循环获取1-100之间的偶数及偶数的个数
最新推荐文章于 2024-09-11 18:01:31 发布
count=0 for x in range(1,101): if x%2==0: print(x,end=' ') count+=1 print(f'\n{count}')