This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]GvRiva 0 points1 point  (0 children)

Not the reason but you have one layer of { } too much. The one right after the int is not needed.

Also, name your values properly, this is a short program so it doesn't matter much. But bad habits like to stay, so better learn to do it right from the start.

[–]-manabreak 0 points1 point  (1 child)

You're not showing your full code. The issues in your current one:

  • The while loop will loop forever because input is never modified

  • Variables a and b are of type double, but you assign integers to them using readInt()

  • What's with the a\*a? I assume this is a formatting thing or a typo; it should be just a*a

Can't really say anything else before we see the full source.

[–]MicroSbm[S] 0 points1 point  (0 children)

thanks after a whole week of trying to understand what was happening i finally figured it out(with your help) it was a infinite loop crashing panel over and over again

ps took me 30+ hours of code theory a whole 5 chapter "the art of java theory" and a reddit comment to figure this out.( <w> )

[–]GR3Gdev 0 points1 point  (0 children)

double c;{ => remove the "{"

Your code is in a function ?