Scientific format with precision of 7
#include <iostream> #include <iomanip> using namespace std; int main() { cout << "Default format: " << 123.123456789 << endl; cout << "Scientific format with precision of 7: "; cout << scientific << 123.123456789 << endl; return 0; }