과학적
Causes floating-point numbers to be displayed using scientific notation.
ios_base& scientific(
ios_base& _Str
);
매개 변수
- _Str
A reference to an object of type ios_base, or to a type that inherits from ios_base.
반환 값
A reference to the object from which _Str is derived.
설명
By default, fixed notation is in effect for floating-point numbers.
The manipulator effectively calls _Str.setf(ios_base::scientific, ios_base::floatfield), and then returns _Str.
예제
// ios_scientific.cpp
// compile with: /EHsc
#include <iostream>
int main( )
{
using namespace std;
float i = 100.23F;
cout << i << endl;
cout << scientific << i << endl;
}
요구 사항
Header: <ios>
네임스페이스: std