#include <iostream> using namespace std; int main() { // Use default width. cout << "Default format.\n"; cout << "|"; cout << 123.45 << "|" << "\n\n"; // Use default right justification cout << "Right-justify in a field width of 12.\n"; cout << "|"; cout.width(12); cout << 123.45 << "|" << "\n\n"; return 0; }