#!/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"Shell Script两个变量相乘
最新推荐文章于 2025-11-30 13:21:12 发布
本文介绍如何使用bash脚本接收两个整数输入,将这两个数相乘,并输出乘积。适用于shell编程初学者。
3406

被折叠的 条评论
为什么被折叠?



