Ugly Numbers: Numbers whose only prime factors are 2, 3 or 5. 1 is also a ugly number by convention. Write a Java program to take input an integer n from the user and check whether n is a ugly or not.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question

Ugly Numbers: Numbers whose only prime factors are 2, 3 or 5. 1 is also a ugly number by convention.

Write a Java program to take input an integer n from the user and check whether n is a ugly or not.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT