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
Top 5 best comedy or action movies.
Cloud [144]
Comedy movies you should watch is
grown ups
spider man into the spider verse
action movies you can do
like a fast and furious movie ?
some cool scary movies are
the strangers
insidious
and the serbian film :)
7 0
3 years ago
Read 2 more answers
Which item is used for formatting in responsive web design?
trapecia [35]

Answer:

4. Removing horizontal scroll

Explanation:

Horizontal scroll can be super annoying when you're trying to view someone's web page. It can cut off part of your view and ruin the whole experience. It's best to eliminate horizontal scroll completely wherever you can.

5 0
3 years ago
Just took a test and I got 5 wrong and I wanted to know the correct answers
baherus [9]

Answer:

I need the pic

Explanation:

7 0
3 years ago
Differentiate between soft copy output and hard copy output?​
katen-ka-za [31]

a hard copy stores data and information in the form of physical files it may be images text photographs and more a soft copy data and information in the form of virtual file saved on a computer or a drive you can preserve a hard copy for two long because its day subjected to wear and tear

4 0
2 years ago
Read 2 more answers
A cell's address, its position in the workbook, is referred to as a ________________ when it is used in a formula.
Inga [223]

Answer:

A cell's address, its position in the workbook, is referred to as a <u>cell reference</u>  when it is used in a formula.

5 0
2 years ago
Other questions:
  • Distinguish the functional requirements an engineer would have to specify for a taxi dispatch system.
    8·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • You can create a database using one of the many templates available or by creating a new ______ database.
    9·1 answer
  • You want to use a wireless keyboard and mouse with your laptop computer. which method should you use
    11·1 answer
  • Select two netiquette guidelines. In a paragraph of no less than 125 words, explain why these guidelines make professional onlin
    9·1 answer
  • User can use ______ commands to search for and correct words in a document
    13·1 answer
  • Every command or instruction is called
    8·2 answers
  • Explain why interrupt times and dispatch delays must be limited to a hard real-time system?
    8·1 answer
  • Two technicians are discussing Newton's first law of motion. Technician A says that a lightweight vehicle requires as
    8·1 answer
  • Today's manufacturing workplace is most likely to include
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!