hello,
c++
Results
945
944 <<<<<----------- THIS ONE I MEAN, some numbers are ok but 9.45 comes out 944 instead of 945 is there any way to stop this
945
thanks a million!!!
when i insert 2.15
result
215
215
215
c++
cout << 9.45 * 100 << endl; double a; double b; int c; b = 9.45; a = b*100.0; c=a; cout << c <<endl<<endl ; cout << a << endl;
Results
945
944 <<<<<----------- THIS ONE I MEAN, some numbers are ok but 9.45 comes out 944 instead of 945 is there any way to stop this
945
thanks a million!!!
when i insert 2.15
int main()
{
cout << 2.15 * 100 << endl;
double a;
double b;
int c;
b = 2.15;
a = b*100.0;
c=a;
cout << c <<endl<<endl ;
cout << a << endl;
return 0;
}
result
215
215
215