Computer Science Canada Turing Program |
Author: | mike cra [ Wed Oct 20, 2010 7:11 pm ] |
Post subject: | Turing Program |
I was able to do Permutations n combination Anyone able to do the GCD or LCM or the Number Theory? I have no clue :S |
Author: | SNIPERDUDE [ Wed Oct 20, 2010 10:42 pm ] |
Post subject: | RE:Turing Program |
Let's tackle this one at a time then. Starting with LCM, what have you tried? What aspect are you stuck with? We can't do your homework for you, but we can help you understand whatever it is you're stuck on. |
Author: | Carey [ Thu Oct 21, 2010 6:56 pm ] | ||
Post subject: | RE:Turing Program | ||
For GCD, you'll want to use recursion and Euclid's Algorithm Example (pseudo-code, will not run):
You can then use the GCD method in finding the LCM by following the formula here |