cout.setf(ios::uppercase | ios::scientific) : cout setf « Console « C++






cout.setf(ios::uppercase | ios::scientific)

  
#include <iostream>
using namespace std; 
int main(void) {
   cout.setf(ios::uppercase | ios::scientific);
   cout << 100.12;
   cout.unsetf(ios::uppercase);
   cout << endl << 100.12;
}
  
    
  








Related examples in the same category

1.cout: how to display float number, ios::showpoint, ios::showposcout: how to display float number, ios::showpoint, ios::showpos
2.You can OR together two or more flags: ios::uppercase | ios::scientificYou can OR together two or more flags: ios::uppercase | ios::scientific
3.cout.setf(ios::showpos | ios::showpoint) and cout.setf(ios::showpoint, ios::showpos | ios::showpoint)
4.Set cout: setf(ios::showpoint | ios::showpos, ios::showpoint)Set cout: setf(ios::showpoint | ios::showpos, ios::showpoint)
5.cout.setf(ios::hex)
6.cout.setf(ios::showbase)
7.Set cout: hex, basefield, setf(ios::hex, ios::basefield)Set cout: hex, basefield, setf(ios::hex, ios::basefield)