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

13y 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

Related questions

How do you write the pseudo codes that will accept 7 numbers and display their sum?

Start accept 7 number calculate sum print sum stop


What is pseudo code algorithm for create a linked list with a header and insert a four numbers to the list?

pseudo code algorithm to create a linked list


What is pseudo-celebrity?

A pseudo celebrity is a every day person a common unknown where people talk about him/her also take pictures as if they were a real celebrity


How do you get a random number from a group of numbers in C?

Random numbers cannot be generated programatically. For pseudo-random numbers use function 'rand'.


What is the pseudo code for a module to calculate the mean of a 5?

Not sure what you mean by "a 5". To calculate the mean (average) of several numbers, you need to add them all up, then divide by the size of the set. Something like this: counter = 0 sum = 0 for each number in the set { counter++ sum += the individual number } result = sum / counter


The output of the pseudo-random number generator?

Is a set of numbers that look random and will pass most tests of randomness.


What is pseudo unimolecular reaction?

A pseudo unimolecular reaction refers to a reaction mechanism where overall kinetics mimic those of a unimolecular reaction, but involve multiple molecules coming together in a step-wise process. This can occur when a stable intermediate is formed that dictates the rate of the reaction, making it appear unimolecular even though it involves multiple reactant molecules.


Meaning of pseudo?

Pseudo means "Fake"


What part of speech is the word pseudo?

Pseudo is an adjective.


When was Pseudo Echo created?

Pseudo Echo was formed in 1982 in Melbourne, Australia.


When was Pseudo Slang created?

Pseudo Slang was created in 2009.


When was Pseudo-City created?

Pseudo-City was created in 2005.