class IfElse
{
public static void main (String[] args) throws java.lang.Exception
{
double x = 1784;
while (x <= 1){
if((x % 2) = 0){
x = x / 2;
}
else{
x = 3 * x + 1;
}
System.out.println(x);
}
}
}
well, I am having problems with the % (modulus). Could someone help? I am a begginer at coding. Have no idea what I am doing. If someone could help´with this...