Help with some logic questions
Okay I am a basic C++ student in high school...I am to write a function on getting a GCF from 2 integers...I am first thinking of the logic of the problem first and how to solve it...So far I've come up with one idea, I am not so sure it is good but its what my mind has come up with...Please either tell me that its a bad method on trying to do this and if it is a bad method, what is a better one?
Okay I am going to find the prime factors of each numbers. Then I will multiply the common numbers together to get the GCF...all idea's are welcome
Also for another program I am working on, is zero considered an even number?(I'm writing another function to remove all even numbers from an array and I am wondering if zero is included as an even number)