新人求解
python吧
全部回复
仅看楼主
level 6
regexepx 楼主
新人求解
2013年12月21日 07点12分 1
level 6
regexepx 楼主
类似于C中这样的语句:
int i=100,s=1;
while(i>0){i-=1;s*=i;}
printf("%d",s);
//当然这会溢出。
用python写:
#缩进控制代码块什么意思?
i=100;s=1;
while i>0:
i+=1;#很明显只循环了这句。。
s*=i;
print s;
怎么解决
2013年12月21日 07点12分 2
level 6
regexepx 楼主
我秀逗了,是逻辑错误。。>1。结帖
2013年12月21日 08点12分 3
i=100;s=1; while i>1: s*=i; i-=1; print s;
2013年12月21日 08点12分
1