Ugly Number in Java
Ugly Number Question : Write a program to accept a number and check whether it is Ugly number or not. Ugly Number : An Ugly number is a positive integer whose prime factors are limited to 2, 3, and 5 First 11 Ugly Numbers : 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15 Example :- Factors of 12 : 1, 2, 3, 4, 6, 12 Prime Factors of 12 : 2, 3 Prime Factorization : Writing a number as products of its prime factors. 12 : 2 X 2 X 3 = 12