Create problem_2_version_2

solution without use of array