ubuntu shell实现加减乘除

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/CosmopolitanMe/article/details/87607489
#!/bin/sh
a=8
b=4
c=$(expr $a \* $b) //乘法
c=$(expr $a + $b) //加法
c=$(expr $a - $b) //减法
c=$(expr $a / $b) //除法

猜你喜欢

转载自blog.csdn.net/CosmopolitanMe/article/details/87607489
今日推荐