Hello, I am a begginner using java and need some help. I get this error when compiling a small program:
')' expected
';' expected
this is the line of code it shows up on:
lucky = (int((100*m*m + 10*d*d*d)/y +Math.sqrt(Math.pow(w, 6)/h))%10+1);
I am not sure what I am missing. I've tried googling the problem but nothing has helped me so far. I appreciate the help and appologise if its some simple mistake I am missing.
Comments
A cast uses parenthesis around the type.
[code]lucky = [color=Blue](int)[/color] (((100*m*m + 10*d*d*d)/y + Math.sqrt(Math.pow(w, 6)/h))%10+1);[/code]
gl,
se52
Again thank you!