#include <iostream> using namespace std; int main() { cout.setf(ios::showpos); cout.setf(ios::scientific); cout << 123 << " " << 123.23 << "\n"; cout.fill('#'); // fill using # cout.width(10); // in a field of 10 characters cout << 123 << " "; cout.width(10); // set width to 10 cout << 123.23; return 0; }
+123 +1.232300e+002 ######+123 +1.232300e+002