Цитата:
Сообщение от dark
преобразую float в double, получаю то же самое.
100 - пробовал убрать дробь, то же самое..
|
Версия, платформа?
PHP код:
int _tmain(int argc, _TCHAR* argv***91;***93;)
{
using std::cin;
using std::cout;
using std::endl;
float a = 27.90;
double b = 27.90;
cout << a << endl;
cout << (int)(a * 100) << endl;
cout << (int)(a * 100.) << endl;
cout << (int)(b * 100.) << endl;
char pause;
cin >> pause;
return 0;
}
PHP код:
27.9
2790
2789
2790