/****************************************************************************** * This program prints floating point constants. * * Copyright © 2016 Richard Lesh. All rights reserved. *****************************************************************************/ #undef NDEBUG #include #include #include #include std::locale utf8loc(std::locale(), new std::codecvt_utf8); using namespace std; int main(int argc, char **argv) { setlocale(LC_ALL, "en_US.UTF-8"); wcout.imbue(utf8loc); wcin.imbue(utf8loc); wcout << 0e0 << endl; wcout << 3.1415e0 << endl; wcout << 1.5e1 << endl; wcout << 3.26e2 << endl; wcout << 1.23e-1 << endl; wcout << -3.1415e0 << endl; wcout << -1e-3 << endl; return 0; }