Task: Make a method that gets the GCF of all the numbers in the list. RULES: > The method must set the GCF variable to the GCF. If there is no GCF, set it to 0. > You must have all your code in the CalculateGCF Custom Block > The method must be able to work if there is any amount of variables in the project. > You can edit the list blocks for testing, but please have them back in the final copy of the project.
This script runs forever, but there was no requirement about that in the instructions. Also, there will always at least be a GCF of 1 with whole numbers. Therefore the "if there is no GCF" rule doesn't mean anything really. I bet this could be shorter.