Displays the value 100 with the showpos and showpoint flags turned on : cout scientific « Console « C++






Displays the value 100 with the showpos and showpoint flags turned on

#include <iostream>
using namespace std;
int main()
{
  cout.setf(ios::showpoint);
  cout.setf(ios::showpos);
  cout << 100.0;
  return 0;
}


           
       








Related examples in the same category

1.cout: change formatscout: change formats
2.Sets both the uppercase and scientific flags and clears the uppercase flag
3.cout: number base, justification, and format flagscout: number base, justification, and format flags