用shell脚本求100以内所有正整数之和
<br /> #!/bin/bash declare -i sum=0 for ((i=1;i\<=100;i++)) do let sum+=$i done echo "Sum:$sum" |---------------|------------------------------------------------------...
<br /> #!/bin/bash declare -i sum=0 for ((i=1;i\<=100;i++)) do let sum+=$i done echo "Sum:$sum" |---------------|------------------------------------------------------...