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
Nadusha1986 [10]
3 years ago
13

In this lab, you declare and initialize variables in a C++ program. The program, which is saved in a file named NewAge.cpp, calc

ulates your age in the year 2050.​
Computers and Technology
1 answer:
Ne4ueva [31]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main() {

int currentYear = 2020;

int myCurrentAge = 23;

int myNewAge=myCurrentAge+(2050-currentYear);

cout << "My Current Age is " << myCurrentAge << endl;

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

}

Explanation:

  • Initialize the currentYear with 2020 and myCurrentAge with 23.
  • Add myCurrentAge with the the result of (2015 - currentYear) and assign this result to myNewAge variable.
  • Finally display my current age and after that display the new age in 2050.

Output:

My Current Age is 23

I will be 53 in 2050.

You might be interested in
An element in a web page that connects to a different location in the same page or a different page is a _____.
Softa [21]
I believe it would be the anchor element.

<a href="#"></a>

Correct me if I'm wrong.
3 0
3 years ago
Magbigay ng ibang produkto na ginagamitan ng kasanayan ng basic sketching shading at outlining ​
JulsSmile [24]

Answer:

Procreate

Explanation:

7 0
3 years ago
What best compares potrait and landscape orientations
REY [17]
In portrait  the height is taller than its wide and in landscape the height is smaller than wide
so its the wider and taller
5 0
3 years ago
Compare and contrast the role that business users play when software is developed using Waterfall and Agile software development
qaws [65]

Answer: Both Agile and waterfall model are software development models to deliver a final outcome in the form of a software product. Waterfall model is sequential process with the requirements beings rigid and defined before beginning the software development.

Agile method basically  concerned with the requirements of the client. Here both testing and development is carried out at the same time.

Explanation:

More differences between the two include :

Waterfall model is easy to manage whereas in agile model as the the client requirements changes and wants more functionalities is becomes a bit more difficult to manage. the role of project manager is very crucial in waterfall model whereas the role of developers ans testers is more important in Agile model.

8 0
3 years ago
The file extension of MS-Word document in office 2007 is?(a) .pdf (b) .doc (c) .docx (d) .txt
serious [3.7K]
It is usually .doc but if you use notepad, (the free version of Word) it's .docx
5 0
3 years ago
Read 2 more answers
Other questions:
  • Respond to the following in a paragraph of no less than 125 words. What is the purpose of netiquette guidelines?
    10·1 answer
  • What is the difference between deta security and privecy ?
    12·2 answers
  • How to write a program converting RGB to CMYK in python
    6·1 answer
  • When using a search engine, what is the name of a word or phrase somebody types to find something online?
    12·2 answers
  • Which picture should i put as my profile picture.
    15·2 answers
  • What is GIGO ?<br>plz answer me​
    7·1 answer
  • Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with
    13·1 answer
  • BADM-Provide a reflection of at least 500 words (or 2 pages double spaced) of how the knowledge, skills, or theories of this cou
    7·1 answer
  • Write a code that takes numbers from the user as a list. (User can enter as many numbers as he wants). Then, find mean and stand
    15·1 answer
  • Uh can somebody help me
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!