关闭

Shell Script两个变量相乘

1298人阅读 评论(0) 收藏 举报
分类:
#!/bin/bash
#Program:
#    User inputs 2 integer numbers; program will cross these two numbers.
#History:
#    2013/08/16
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
echo "You should input 2 numbers,I will cross them! \n"
read -p "first number: " firstnu
read -p "second number: " secondnu
total=$(($firstnu*$secondnu))
echo "The result of $firstnu x $secondnu is ==> $total"

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:69254次
    • 积分:1654
    • 等级:
    • 排名:千里之外
    • 原创:93篇
    • 转载:54篇
    • 译文:1篇
    • 评论:3条
    最新评论