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
What does clicking and dragging the fill handle in excel
Olegator [25]

Answer:

The fill handle copies the same values, formulas, or fills a series of dates, texts, numbers, and other data to a desired number of cells. ... Click and hold the handle, then you can drag up, down, across over other cells. When you release your mouse button, it auto-fills the content to the cells you dragged over.

5 0
2 years ago
Keep true , never be ashamed of doing right decide on what you think is right and stick to it.
Doss [256]
This is the quote of T.S. Eilot
5 0
3 years ago
What statement would you use to print the phrase Hello, world and then start a new line?
tangare [24]

Answer:

Statement to print phrase "Hello, world" and then start a new line in java.

System.out.println("Hello, world");

Explanation:

In java, we use "System.out.println();" statement to print any string/phrase and then start a new line.The above line will print phrase "Hello, world" and then start a new line.

Implementation in java:

// class definition

class Main

{

// main method of the class

public static void main (String[] args)

{

// statement to print phrase and start new line

      System.out.println("Hello, world");  

} }

7 0
3 years ago
Which of these categories of computer software can add thousands of dollars to the cost of a computer system?
Radda [10]
Specialized software. hope this helps
6 0
3 years ago
Which sentence describes a task on which a genetic engineer is most likely to work?
galina1969 [7]

Answer:

C

Explanation:

If you look at the picture, you will see why it is C. It says D, but the multiple choices are differently ordered and it is kind of differently worded.

But in conclusion, the answer is C.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is a correct definition of the term rectification? A. Rectification is the opposition to current flow in
    14·2 answers
  • NullPointerException and ArithmeticException are both derived from which class?
    10·1 answer
  • Your friend sends you a computer game. after installing the game on your computer, you realize that it plays very slowly. you kn
    14·1 answer
  • Que son los sistemas de control con retroalimentacion
    10·1 answer
  • Direct Mapped Cache. Memory is byte addressable. Fill in the missing fields based upon the properties of a direct-mapped cache.
    6·1 answer
  • Which of the following situations would not require knowledge of networking?
    11·2 answers
  • Caroline is building an expert system for wartime defense. Which of these is true about the system she is building?
    14·1 answer
  • What is syntax?
    15·1 answer
  • Document templates are available online.<br> True<br> False
    8·2 answers
  • Which of the following statements is TRUE of a peer-to-peer network?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!