C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Third Edition…