1 #!/bin/bash
2
3 sum=0
4 count=$1
5 for i in `seq 1 2 $count`
6 do
7 sum=$((sum + i))
8
9
10 done
11
12 echo "1+3+5+...+$count=$sum"
shell脚本之计算计算1+3+5....$count
最新推荐文章于 2023-05-09 19:18:00 发布