Question: Task 1 : Declare a constant named YEAR, and initialize YEAR with the value 2 0 5 0 . Task 2 : Edit the statement

Task 1: Declare a constant named YEAR, and initialize YEAR with the value 2050.
Task 2: Edit the statement myNewAge = myCurrentAge +(2050 currentYear) so it uses the constant named YEAR.
Task 3: Edit the statement cout << "I will be "<< myNewAge <<" in 2050."<< endl; so it uses the constant named YEAR.
Task 4: All instances of inline, hard-coded 2050 have been replaced with the YEAR constant.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!