Write a PHP program to check whether a given number is an ugly number.
Input : 12
Ugly numbers are positive numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, ...
shows the first 10 ugly numbers.
Note: 1 is typically treated as an ugly number.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer