int a = 2;
double b = 2.35;
cout<<(b / a)<<endl;
cout<<int(b / a)<<endl;
if(b / a == int(b / a)) //强转去掉小数位置数值
cout<<"是整数"<<endl;
else
cout<<"不是整数"<<endl;
int a = 2;
double b = 2.35;
cout<<(b / a)<<endl;
cout<<int(b / a)<<endl;
if(b / a == int(b / a)) //强转去掉小数位置数值
cout<<"是整数"<<endl;
else
cout<<"不是整数"<<endl;