Pelles C forum
Pelles C => General discussions => Topic started by: Hoborob on August 26, 2011, 03:54:10 AM
-
I am working on a program were one of the functions needs to find the greatest cmmon divisor for two fractions. The request I have is for some ideas on how to accomplish this function.
-
Well, I'd start here... http://en.wikipedia.org/wiki/Greatest_common_divisor
Once you know the mechanics, you need to work the problem with pencil and paper so that you can see each step in the process... then just convert your notes to C code.
It's 4 pretty simple steps... Understand -> Plan -> Write -> Test.
If you get stuck post your code in the Beginner's forum and ask some specific questions. They guys here are pretty smart and I'm sure you'll get your solutions.
However... don't expect anyone to do your homework for you. We have our own work to do.
-
If you get stuck post your code in the Beginner's forum and ask some specific questions. They guys here are pretty smart and I'm sure you'll get your solutions.
However... don't expect anyone to do your homework for you. We have our own work to do.
Looks like school has started again... ;D
Ralf
-
Not to worry I have already found a method to find a GCD and have impletmented the code. I do appreciate the direction to look. Turns out the code needed to do the job was only about 5 lines of code and it does work very well. Agian thanks for the direction.
-
Looks like school has started again... ;D
Ralf
Round these parts it's the first full week in September, but I'm guessing some are just finishing summer school and make up assignments... Let the fun begin! ;D