shell编程第十题

shell编程第十题

鸡兔同笼:

read -p "please enter heads and legs: " tou tui
tuzi=$(((tui-2*tou)/2))
ji=$((tou-tuzi))
echo 兔子=$tuzi 鸡=$ji

image-20230523170706482

(158条消息) (四)Shell编程之算数运算_shell算术运算_覆水难收呀的博客-CSDN博客

致谢博主提供技术支持!

posted @ 2023-05-23 19:44  北京烤鸭酸奶  阅读(23)  评论(0)    收藏  举报