1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
klemol [59]
3 years ago
12

Declare a constant named YEAR, and initialize YEAR with the value 2050. Edit the statement myNewAge = myCurrentAge + (2050 − cur

rentYear) so it uses the constant named YEAR. Edit the statement cout << "I will be " << myNewAge << " in 2050." << endl; so it uses the constant named YEAR.#include
using namespace std;
int main()
{
int myCurrentAge = 29;
int myNewAge;
int currentYear = 2014;


myNewAge = myCurrentAge + (2050 - currentYear);

cout << "My Current Age is " << myCurrentAge << endl;
cout << "I will be " << myNewAge << " in 2050." << endl;

return 0;
}
looking for code pattern
Computers and Technology
1 answer:
givi [52]3 years ago
7 0

Answer:

The following edits will be made to the source code

const int YEAR = 2050;

cout << "I will be " << myNewAge << " in "<<YEAR<<"." << endl;

Explanation:

First, YEAR has to be declared as an integer constant. This is shown as follows;

<em>const int YEAR = 2050;</em>

This will enable us make reference to YEAR in the program

Next,

Replace the following:

cout << "I will be " << myNewAge << " in 2050." << endl;

<em>with</em>

cout << "I will be " << myNewAge << " in "<<YEAR<<"." << endl;

<em>I've added the edited source file as an attachment;</em>

Download cpp
You might be interested in
How do you join The Meeting on zoom because I have class Tomorrow with My Teacher
Svetllana [295]

Answer:

Go to join.zoom.us. Enter your meeting ID provided by the host/organizer. Click Join. When asked if you want to open zoom.us, click Allow.

Explanation:

3 0
3 years ago
Read 2 more answers
What is the term that is used to describe a computer system that could store literary documents, link them according to logical
LiRa [457]

Answer:

Hypertext

Explanation:

Based on the information provided within the question it can be said that the term that is being described is called Hypertext. This is an integrated software function that is found in many operating systems which allows the user to link different text and documents together for immediate access when the documents are logically related to one another.

3 0
3 years ago
What invention changed the nature of communication and commerce in the first half of the nineteenth century?
serg [7]
Answer: The Telegraph 

Hope this helps you out!
6 0
3 years ago
Read 2 more answers
"Inheritance is the process by which a new class - known as a _________ - is created from another class, called the ____________
Novay_Z [31]

Answer:

child class

parent class

Explanation:

"Inheritance is the process by which a new class - known as a __child class__ - is created from another class, called the __parent class__. "

3 0
3 years ago
James uses a database to track his school's football team. Which feature in a database allows James to find a specific player by
skad [1K]
The answer to this question is A
6 0
3 years ago
Other questions:
  • Name the written test a potential driver must pass and list the minimum required score to earn a learners license?
    9·1 answer
  •  When using cost-benefit analysis to determine the benefits of a community project, economists measure the value in terms of (A.
    14·1 answer
  • How do i stream from my chromebook to my tv?
    8·1 answer
  • Which of the following controls will provide an area in the form for the user to enter a name? a. button b. label c. text box d.
    8·1 answer
  • In Broadbent's filter model of attention, the stages of information processing occur in which order?
    9·1 answer
  • (Bible)<br> Sin may be an inward thought or an outward act. True False
    11·2 answers
  • PLS HELP
    5·1 answer
  • Points! taga pilipinas ba kayo?​
    10·1 answer
  • Hand tools are generally classified based on :​
    5·1 answer
  • 3. What of the following is the main components of computer system?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!