int转换为double
int i1,i2;
double d = (double)(i1/i2);//好像不行?
------解决方案------------------------------------------------------------
int i1,i2;
double d = (double)(i1/i2);//好像不行?
----------------------------------------
應該是double d = ((double)i1)/((double)i2);
想想:double d = (double)(3/2);//結果是1.5?1?