S
Sasi
create a J# windows applicaion.add a button , a label and two textboxes to
form and paste this code into the buttons event handler:
private void button1_Click(Object sender, System.EventArgs e)
{
label1.set_Text(Float.toString(
Float.parseFloat(textBox1.get_Text())
*
Float.parseFloat(textBox2.get_Text())
));
}
when you run the project and test it with 3 and 6.7 ; you get freaking
result of "20.0999985" in the label instead of "20.1" .if try 3 and
6.71,you'll get "20.1300011" instead of "20.13" .
what the hell is wrong with J# float numbers?
form and paste this code into the buttons event handler:
private void button1_Click(Object sender, System.EventArgs e)
{
label1.set_Text(Float.toString(
Float.parseFloat(textBox1.get_Text())
*
Float.parseFloat(textBox2.get_Text())
));
}
when you run the project and test it with 3 and 6.7 ; you get freaking
result of "20.0999985" in the label instead of "20.1" .if try 3 and
6.71,you'll get "20.1300011" instead of "20.13" .
what the hell is wrong with J# float numbers?