输入两个数后输出相乘的结果

 1 #!/bin/bash
 2 # Program
 3 #       User inputs 2 integer numbers:program will cross these two numbers.
 4 # History:
 5 # 2015/9/6      zengdp  First release
 6 PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
 7 export PATH
 8 echo -e "You SHOULD input 2 numbers, I will cross then! \n"
 9 read -p "first number: " firstnu
10 read -p "second number: " secnu
11 total=$(($firstnu*secnu))
12 echo -e "\nThe result of $firstnu x $secnu is ==> $total"

 

posted @ 2015-09-06 15:27  todaytoday  阅读(369)  评论(0编辑  收藏  举报