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"
Write a unix shell script to find the LCM of two numbers. *
15
20
To find a pair of numbers with a given GCF, take the GCF number and double it. The pair of numbers is the GCF, and two times the GCF. For instance, two numbers with a GCF of 3 are 3 and 6.
To find the average of a given set of numbers, total the numbers and divide that total by the number of members of the set.
This will be difficult to answer accurately if we don't know the given number, so we'll make one up. 36. Two pairs of numbers with an LCM of 36 are 4,9 and 12,18.
Often, in mathematical problems, you are asked to find out an unknown value. Towards that end, you are "given" some numbers to assist in that process.
A common question in mathematics asks you to find two pairs of numbers with a given LCM. It is trying to find out whether you know what an LCM is, how to find it and reinforces the fact that more than one pair of numbers can have the same LCM. Q. Find two pairs of numbers with the LCM of 36. A. 4 and 9, 12 and 18 (Other answers are possible.)
Check below link
Yes
k
syntax error
Add the numbers, then divide by three. I don't know vb script, but in most programming languages it would be something like this: result = (a + b + c) / 3
By finding their common prime numbers.
if the gcd and lcm are given and one of the numbers are also given,multiply the gcd and lcm and divide them by the given number
By first GIVING the numbers!
Shell problems are programs that can be run to find out information about numbers. The problem can help find an even or odd number, or what the sum of a cube is.
draw a flow chart to find hcf of two given numbers
Their given! You found it! Boom
the script of