Sooo I'm having an issue with my function.
static int syracuse(int x){
if (x%2==0){
return x/2;
else{
return 3*x+1;
}
}
}
Well soo my issue is : if x is even, return x/2 OR is x if odd. returns 3x+1. But when I try to compile java tells me that ( 'else' with 'if') I don't know what to do :\
why would I need a else if?