/****************************************************************************** * This program prints various math constants. * * Copyright © 2020 Richard Lesh. All rights reserved. *****************************************************************************/ #undef NDEBUG #include #include #include #include std::locale utf8loc(std::locale(), new std::codecvt_utf8); using namespace std; static double const C_M_PER_SEC = 299792458; static double const PLANCK_J_SEC = 6.62607015E-34; static double const NEWTONS_GRAVITAION_M3_PER_KG_PER_SEC = 6.6743015E-11; static double const ELEMENTARY_CHARGE_COULOMBS = 1.602176634E-19; static double const AVOGADRO_PER_MOL = 6.02214076E23; static double const BOLTZMANN_J_PER_DEGREE = 1.380649E-23; int main(int argc, char **argv) { setlocale(LC_ALL, "en_US.UTF-8"); wcout.imbue(utf8loc); wcin.imbue(utf8loc); wcout << L"c: " << C_M_PER_SEC << endl; wcout << L"h: " << PLANCK_J_SEC << endl; wcout << L"G: " << NEWTONS_GRAVITAION_M3_PER_KG_PER_SEC << endl; wcout << L"e: " << ELEMENTARY_CHARGE_COULOMBS << endl; wcout << L"L: " << AVOGADRO_PER_MOL << endl; wcout << L"k: " << BOLTZMANN_J_PER_DEGREE << endl; return 0; }