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