John Deere Interview Question

write a piece of code to find GCF