subject

Declare a constant named YEAR, and initialize YEAR with the value 2050. Edit the statement myNewAge = myCurrentAge + (2050 − currentYear) 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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
The following is an excerpt from a slide presentation. today we will inverse operations solving equations using inverse operations solving inequalities using inverse operations from which part of the presentation does the slide most likely come from? a. introduction b. outline c. body d. conclusion
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
You know the right answer?
Declare a constant named YEAR, and initialize YEAR with the value 2050. Edit the statement myNewAge...
Questions
question
Computers and Technology, 06.03.2021 14:00
question
World Languages, 06.03.2021 14:00
question
Mathematics, 06.03.2021 14:00
question
Advanced Placement (AP), 06.03.2021 14:00
question
Computers and Technology, 06.03.2021 14:00
question
Mathematics, 06.03.2021 14:00
Questions on the website: 13722361