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
Desertification is caused by
Alex Ar [27]
<span>it is caused by A.overgrazing
</span>
5 0
3 years ago
Decomposition is
Allushta [10]

Answer:

breaking a problem into smaller parts

Explanation:

In language of computer science, decomposition is the process in which complex problems are divided into simpler parts. These simpler parts helps in the solving of the complex problems. They are made easier and comprehensible for the user to understand. Each simple part is further analyzed separately and the solution of the complex issues are derived.  The process becomes lengthy but the solution is found.

8 0
3 years ago
How to do 2. Pleaser
V125BC [204]

Answer:

GOD HAS FORSAKEN YOU NOW PRAISE DHAR MANN

6 0
3 years ago
Which of the following is considered a benefit of using simulation programs? a. They allow users to experience potentially dange
erica [24]

Answer:

All of the above

Explanation:

7 0
3 years ago
In excel, an anchor($) allows you to?
mina [271]
Sssa rinmmy sihoa ihu hji ishoa io>?
6 0
3 years ago
Other questions:
  • What is called photo and video edition?
    8·1 answer
  • At the moment i am tackling the cs50x projects and i need a little bit of help with problem set 1, the 'greedy algorithm'. I am
    5·1 answer
  • Why is musical notation important? What benefits do musicians and others receive from being able to write down and note aspects
    12·1 answer
  • Which of the following image file formats uses lossy file compression?
    7·1 answer
  • What is the purpose of application software policies?
    12·1 answer
  • Which of these statements about the truck driving occupation in the U.S. are accurate?
    12·2 answers
  • Why is computer called information processing maching???​
    6·2 answers
  • What are the challenges of Cyber Law???? Needed ASAP ​
    5·1 answer
  • Immigrants are allowed to enter the country to work when they have a(n)
    10·1 answer
  • question 5 you need to find the internet protocol (ip) address for a website. which command do you use on a windows system?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!