От: | Аноним | ||
Дата: | 25.10.05 11:26 | ||
Оценка: |
От: | valker | ||
Дата: | 25.10.05 11:38 | ||
Оценка: |
Example
// ios_fixed.cpp
// compile with: /EHsc
#include <iostream>
int main( )
{
using namespace std;
float i = 1.1;
cout << i << endl; // fixed is the default
cout << scientific << i << endl;
cout.precision( 1 );
cout << fixed << i << endl;
}
Output
1.1
1.100000e+000
1.1
От: | Аноним | ||
Дата: | 25.10.05 11:43 | ||
Оценка: |