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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:40, EricaLSH7624
Match the personality traits with their description
Answers: 2
image
Computers and Technology, 22.06.2019 07:00, Jasten
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
image
Computers and Technology, 23.06.2019 01:30, bri2728
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most? a)give the file a unique name b)name the file in yymmdd format c)use descriptive name while naming the files d)use capital letters while naming the file
Answers: 3
image
Computers and Technology, 24.06.2019 10:00, shrafe
Which two technologies support the building of single-page applications?
Answers: 2
You know the right answer?
Declare a constant named YEAR, and initialize YEAR with the value 2050. Edit the statement myNewAge...

Questions in other subjects:

Konu
Mathematics, 17.10.2020 14:01