Use setiosflags(): ios::showpos, ios::scientific : cout setiosflags « Console « C++






Use setiosflags(): ios::showpos, ios::scientific

Use setiosflags(): ios::showpos, ios::scientific


 
#include <iostream> 
#include <iomanip> 
using namespace std; 
 
int main() 
{ 
  cout << setiosflags(ios::showpos) << setiosflags(ios::scientific) 
       << 123 << " " << 123.23; 
 
  return 0; 
}

           
       








Related examples in the same category

1.cout: set ios flags, ios::showpos, ios::showbasecout: set ios flags, ios::showpos, ios::showbase
2.setiosflags(): set the format flags related to a streamsetiosflags(): set the format flags related to a stream