Problem 1.3 Barn Repair - C++ Solution