Standalone C++ code for Chi square critical value calculation