solobaba / aritgeo Goto Github PK
View Code? Open in Web Editor NEWAritGeo function that takes one argument, an array. You are to required to check if the array passed as an argument is arithmetic, geometric, neither arithmetic nor geometric in progression or if the array is empty. For arithmetic progressions, return Arithmetic. For geometric progressoin, return Goemetric. For neither of the above, return -1. For an empty array, return 0.