# include <stdio.h>
int main()
{
int n,x=0;
scanf("%d",&n);
if (n <= 0) {
printf("Input a Correct Number.");
}
while (n != 1)
{
if (n % 5 == 0)
{
n /= 5;
}
else if (n % 3 == 0)
{
n /= 3;
}
else if (n % 2 == 0)
{
n /= 2;
}
else{
printf("It is not an ugly number.\n");
x = 1;
break; }
}
if (x==0){
printf("It is an ugly number.\n");
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: