エンジニアのソフトウェア的愛情

または私は如何にして心配するのを止めてプログラムを・愛する・ようになったか

2011-12-02から1日間の記事一覧

「40 - 32 / 2 = 4!」新実装篇

前々々回、前々回の続きで、 前回考察した結果を元に実装。 C++ #include <iostream> #include <vector> #include <boost/format.hpp> #include <boost/lexical_cast.hpp> void print(int a, int b, int c) { const int m = (a - b) / c; const int n = a - b / c; std::cout << (boost::format("(%1% - %2%) / %3% = %4%"</boost/lexical_cast.hpp></boost/format.hpp></vector></iostream>…