1. 程式人生 > >用shell指令碼求100以內所有正整數之和

用shell指令碼求100以內所有正整數之和

1234567 #!/bin/bashdeclare-isum=0for((i=1;i<=100;i++))dolet sum+=$idoneecho"Sum:$sum"
0