python 经典联系:求1-100的和
n = 100 sum = 0 counter = 1 while counter <= n : sum = sum + counter counter += 1 print("1到100的和为:%d"%(sum))
python 经典联系:求1-100的和
n = 100 sum = 0 counter = 1 while counter <= n : sum = sum + counter counter += 1 print("1到100的和为:%d"%(sum))