#!/bin/bash
#升序排列
read -a arr
if ((arr[0]>arr[1]))
then
temp=${arr[0]}
arr[0]=${arr[1]}
arr[1]=$temp
fi
echo ${arr[*]}
#判断水仙花数
read b
if (((b%10)**3+(b/10%10)**3+(b/100)**3==b))
then
echo YES
else
echo NO
fi
#输入成绩实现登记判断
read score
if ((score<=59))
then
echo E
elif ((score<=69))
then
echo D
elif ((score<=79))
then
echo C
elif ((score<=89))
then
echo B
else
echo A
fi
C高级Day2-3
最新推荐文章于 2024-07-13 18:32:53 发布