Create E2-6.cpp

Exercise 2.6