#include #include using namespace std; int main() { double h = 6.62606957E-34; // Planck's constant in J*s cout << "h = " << h << endl; cout << "Setting precision to 4 digits after the decimal" << endl; cout << setprecision(4); cout << "h = " << h << endl; cout << "Print h (right-aligned) in a field 12 spaces long" << endl; cout << "h = " << setw(12) << h << endl; cout << "Note: setprecision() affects future numbers sent to cout" << endl; cout << " but setw() only affects the very next thing sent to cout" << endl; }