answersLogoWhite

0


Best Answer

Get a and b // where a and b are 2 numbers taken from the user

Set Ma to a // Ma is the multiple of a

Set Mb to b // Mb is the multiple of b

While Ma<>Mb //(condition is that Ma not equal Mb)

{ if (Ma > Mb) then // finding which multiple is smaller

Set Mb to Mb + b // we add to the smaller multiple the input value

Else

Set Ma to Ma + a

End if

}

Print "the LCM of the numbers is" + Ma

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is pseudo code to calculate least common multiple of two numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Other Math

Does the pseudo-complex number 3 t have a multiplicative inverse?

Does the pseudo complex number 3+t have multiplication inverse


Can a computer produce a list of random numbers?

Most computers generate pseudo-random numbers - these are numbers which are created using a formula, but due to the way the formula works, the sequence of numbers generated appears random and is good enough for most applications. The random number generator can be seeded so that the same sequence of "random" numbers is generated every time. Some systems improve on this by using unpredictable "real-world" events to create a more truly random sequence: The Apple ][ computer when waiting for a key press from the user would keep incrementing the current "seed"; thus the seed was influenced by the random event of the user pressing a key but if a series of "random" numbers was then taken, they were strictly pseudo-random. Linux has a pseudo-random number generator in a library function, but it also has in the kernel itself an "entropy pool" which is filled by environmental "noise" created by device drivers, etc. By accessing /dev/random a series of numbers is created from this pool; if the pool empties then the device will block until more "Noise" has been collected. /dev/urandom acts similarly, except that if the pool empties, then it falls back onto a pseudo-random sequence. As the entropy pool is limited in size, the random values being read should be used where security is important, eg in creating the key for an encryption, in small doses.


What is the sum of the first 64 terms of the binary sequence?

A binary sequence is a sequence of [pseudo-]randomly generated binary digits. There is no definitive sum because the numbers are random. The sum could range from 0 to 64 with a mean sum of 32.


Is writing pseudo code the same as writing in a specific language?

nope


How do you create a matrix consisting of pseudo random number of 3 by 3?

2