Best Answer

#!/bin/Bash

echo "Enter the two numbers to be Multiplied:"

read n1

read n2

answer=`expr $n1 \* $n2`

echo $answer

Q: Shell script for multiplying two numbers?

Write your answer...

Submit

Still have questions?

Continue Learning about Math & Arithmetic

The product of two numbers is the answer to multiplying the two numbers together.

the PRODUCT :)

Is the result of multiplying two numbers together.

you get a product.

The product

Related questions

a=10; b=20; c=`expr $a + $b`; printf "$c";

The product of two numbers is the answer to multiplying the two numbers together.

the PRODUCT :)

Is the result of multiplying two numbers together.

you get a product.

It depends on the script language you are using. In the Korn shell, you can say: echo -n "Enter the first number: " read first echo -n "Enter the second number: " read second let third=$first+$second echo The answer is $third

The product

the two numbers to equal to 63 is 9 and 7.

It is not. When multiplying two whole numbers you need not be concerned about placing the decimal point in the answer.

Shell program to find LCM and hcf of two no.s tput clear echo "Enter first no" read a echo "Enter 2nd no" read b p= 'expr $a \* $b' while [$b -ne 0] do r= 'expr $a % $b' a=$b b=$r done LCM = 'expr $p / $a' echo "LCM = $LCM" echo "Hcf = $a"

Every odd number. Multiplying two even numbers gives an even number. Multiplying an odd and an even number gives an even number. Multiplying two odd numbers gives an odd number.

the product