#include#include int main() { std::cout << std::scientific << std::setprecision(3) << 1234.56789 << std::endl; return 0; }
1.235e+03
#include#include int main() { std::cout << std::left << std::setw(10) << "Left" << std::endl << std::right << std::setw(10) << "Right" << std::endl; return 0; }
Left RightThese examples are part of the C++ standard library and do not require any additional libraries or packages.