Write a PHP program to check whether a sequence of numbers is a geometric progression or not.
Input : array(2, 6, 18, 54)
In mathematics, a geometric progression or geometric sequence, is a sequence of numbers where each term after the first is found by multiplying the previous one by a fixed, non-zero number called the common ratio. For example, the sequence 2, 6, 18, 54, ... is a geometric progression with common ratio 3. Similarly, 10, 5, 2.5, 1.25, ... is a geometric sequence with common ratio 1/2.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer