answersLogoWhite

0

Still curious? Ask our experts.

Chat with our AI personalities

SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
JudyJudy
Simplicity is my specialty.
Chat with Judy
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
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

[object Object]

User Avatar

Himani Patel

Lvl 2
2mo ago
User Avatar

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

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