0

new coder java environment

double pi =3.14; 
int a = 10; 
int b = 2; 
double z = pi*a*b; 
System.out.println(z); 

I think the result is 62.8 but the real result is 62.800000000000004

I want to know :why the error appears? What could i read or which area should i study to dig in this question?

thanks a lot

bob dan
  • 1
  • 1

0 Answers0