发布网友 发布时间:2022-04-23 16:29
共1个回答
热心网友 时间:2023-09-21 19:01
#!制/bin/bashsum(){ total=0 for num in `seq $1 $2` do let total+=num done echo $total} read -p "Input number1: " num1read -p "Input number2: " num2if [ $num1 -ge $num2 ]; then echo "Wrong number!" exit 1fisum $num1 $num2exit 0