Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I recently purchased a text about programming assembly language for intel based computers. At the end of my current chapter is this problem;
Write a program that accepts two integers from the user. The program should then calculate the least common multiple. (the smallest number that
you can multiply both input values by evenly). Prime factorization is
the recommended method to accomplish this. To test this part of your program, here are some inputs and outputs.
[italic]Input: 3,2 LCM = 6
Input: 5,10 LCM = 10
Input: 4,6 LCM = 12[/italic]
Next, using these same two input values, determine if they are prime and output the results. Note that if prime factorization is used in the previous step, you have already done this.
Finally, if the numbers are less than 10, multiply each 100 then convert these numbers to packed decimal.
This is meant to be a [color=Purple]challenge[/color] problem, and therefor optional, but I cannot for the life of me figure out two things.
1. [b]How to find the [italic]LCM[/italic],[/b] and
2. [b]packed decimal[/b]?
Neither have been even hinted at in my text. If anyone can point me in the right direction I would be eternally grateful.
0 · ·