Added a C solution that compiles to C99