#include #include #include using namespace std; int main(int argc, char **argv) { int i = 0; double d = 0; try { i = stoi(string(argv[1])); } catch (exception ex) { cout << "Can't convert to integer!" << endl; exit(1); } try { d = stod(string(argv[2])); } catch (exception ex) { cout << "Can't convert to floating point!" << endl; exit(1); } cout << fmt::format("i + d = {0:f}", i + d) << endl; return 0; }