C++ Program for Valencia Testing