answersLogoWhite

0


Best Answer

#!/bin/Bash

echo "Enter the two numbers to be Multiplied:"

read n1

read n2

answer=`expr $n1 \* $n2`

echo $answer

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Shell script for multiplying two numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a shell script for addition of two numbers using expr?

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


What is product of two numbers?

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


Product of two numbers?

Is the result of multiplying two numbers together.


When adding two numbers you get a sum but when MULTIPLYING two numbers what do you get?

the PRODUCT :)


When multiplying two numbers the answer is what?

you get a product.


The result of multiplying two numbers?

The product


In Shell script. How do I ask for and accept two numbers and then calculate the sum of the supplied numbers and display the sum.?

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


What two numbers get 63 by multiplying?

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


How is multiplying a decimal by a whole number the same as multiplying 2 whole numbers?

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


Which numbers when multiplied by 5 gives an odd numbers?

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.


Shell script to find LCM of the given two numbers?

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"


What do you call the result of multiplying two numbers?

the product