/****************************************************************************** * This program computes quadratic equations. * * Copyright © 2016 Richard Lesh. All rights reserved. *****************************************************************************/ #undef NDEBUG #include #include #include #include #include #include std::locale utf8loc(std::locale(), new std::codecvt_utf8); using namespace std; static double const A = 3.; static double const B = 2.; static double const C = 1.; int main(int argc, char **argv) { setlocale(LC_ALL, "en_US.UTF-8"); wcout.imbue(utf8loc); wcin.imbue(utf8loc); double x = 0.; double y = A * x * x + B * x + C; wcout << fmt::format(L"f({0:.6g}) = {1:.6g}", x, y) << endl; ++x; y = A * x * x + B * x + C; wcout << fmt::format(L"f({0:.6g}) = {1:.6g}", x, y) << endl; ++x; y = A * x * x + B * x + C; wcout << fmt::format(L"f({0:.6g}) = {1:.6g}", x, y) << endl; ++x; y = A * x * x + B * x + C; wcout << fmt::format(L"f({0:.6g}) = {1:.6g}", x, y) << endl; return 0; }