Output float number with fixed flag : float output « Data Type « C++






Output float number with fixed flag

  
#include <iostream>
#include <iomanip>
using namespace std; 
int main(void){
   float value = 0.000123;

   cout << setiosflags(ios::fixed) << value << '\n';
}
  
    
  








Related examples in the same category

1.Set precision for float number
2.Output float type number with scientific format
3.Change cout width and precision for string and float number output
4.Output float in default floating-point format
5.Floating-point values in system default, scientific, and fixed formats.
6.Controlling precision of floating-point values