answersLogoWhite

0

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
More answers

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"

User Avatar

Wiki User

13y ago
User Avatar

Write a unix shell script to find the LCM of two numbers. *

User Avatar

Anonymous

4y ago
User Avatar

15

20

User Avatar

Anonymous

4y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Shell script to find LCM of the given two numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp