Mega Code Archive

 
Categories / C++ / Data Type
 

Output float type number with scientific format

#include <iostream> #include <iomanip> using namespace std;  int main(void){    float value = 0.000123;    cout << setiosflags(ios::scientific) << value << '\n';  }