Logic Code Added

Code with solution added. Program can now be compiled, ran, and outputs
a result.