//Hi. i'm having problem with my break for the loop. It's my understanding that only a minor tweak needs to be made. I've tried different approaches, though they mostly involve making bigger changes. Can anyone help me out with pointing out why my code doesn't stop when number reaches 0.5?
public class test_c
{
public static void main(String\[\] args)
{
double number = 2.0;
while (true)
{
number -= 0.1;
if (number == 0.5)
break;
System.out.println (number);
}
}
}
//I'm at a loss and way behind..