码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-09-06 16:17:10      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:

 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"

 

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

标签:

原文地址:http://www.cnblogs.com/jacson/p/4785726.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!