plz tell me how 2 find GCD(greater common diviser)

M

mudasirk

actually i have recently started learning C++, i have my paper of C++
tommorow......so plz help me how 2 find GCD .......
 
K

Kai-Uwe Bux

actually i have recently started learning C++, i have my paper of C++
tommorow......so plz help me how 2 find GCD .......

Hit the books. For instance

Knuth: The Art of Computer Programming II -- Seminumerical Algorithms
[Chapters 4.5.2 and 4.5.3, pages 333-378]

discusses various algorithms for finding the GCD in detail. Alternatively,
you can use Google (e.g., Euclid's Algorithm comes to mind).

Once you settled on a method try to implement it in C++ and when you have a
specific C++ question, we might be able to help you.


Best

Kai-Uwe Bux
 
D

David Hilsee

actually i have recently started learning C++, i have my paper of C++
tommorow......so plz help me how 2 find GCD .......

Do a google search for "Euclidean Algorithm".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top