2011-04-16から1日間の記事一覧

Fizz Buzz問題を解いてみた

C++

どこかでFizzBuzzが書けないやつはプログラマではないという記事を見たので、あわてて書いてみた。 #include <iostream> template <int N, bool f15, bool f5, bool f3> struct Message { static const int value = N; }; template<int N, bool f5, bool f3> struct Message<N, true, f5, f3> { static const char* value; }; template <int N, bool f5, bool f3> cons…</int></n,></int></int></iostream>