为什么显示结果的时候小数位数会有那么大区别!????
class GalToLitTable{public static void main(String args[]){
double gallons,liters;
int counter;
counter=0;
for(gallons=1;gallons<=100;gallons++)
{
liters=gallons *3.345;
System.out.println(gallons +" gallons is equal to "+liters +"liters");
if (counter==10)
System.out.println();
counter=0;
}
}
}