John Deere interview question

write a piece of code to find GCF