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
Which of the following changes the features (e.g., thickness of the line, shadow, 3-D effect, single or double, etc.) of the bor
lilavasa [31]
Border style
I hope it’s work
8 0
3 years ago
What is the difference between - and % in mysql
jarptica [38.1K]

Answer:

Explanation:

Mysql is an open source database management system written in C and C++ language used to store, retrieve or modify a database. Mysql is used as a web database. Mysql can be combined with other programs so as to provide relational database capabilities as well as its implementation.

% matches any number of characters as well as zero characters while _ matches exactly one character.

3 0
2 years ago
Before entering a loop, the first input, or ____, is retrieved.
Virty [35]

Loop is a control structure that causes a statement or group of statements to repeat.Before entering a loop, the first input, or the accumulator where the total will be kept is retrieved to an initial value, usually zero.

3 0
3 years ago
What tab should you choose if you want to practice presenting with your PowerPoint slides?
dezoksy [38]

Answer:

i think its slideshow tab

Explanation:

tell me if im right

6 0
2 years ago
Read 2 more answers
Lenders always accept applications for credit
LenKa [72]
The correct answer to the question that is being stated above is FALSE.

The statement is false because lenders do not always accept applications for credit. Lenders always consider credit history of the applicant. If the applicant has a good credit history background, then he qualifies.
3 0
3 years ago
Other questions:
  • "write a program that reads two floating point numbers and prints their sum difference and product."
    13·1 answer
  • why do networking components need more examination from an information security perspective than from a systems development pers
    5·1 answer
  • Word Online works exact same as the downloaded Office 2016 version.<br>True<br>False​
    7·1 answer
  • Pls help brainliest
    12·1 answer
  • BRAINLIEST !!A game design document is like a diary for game developers.
    11·1 answer
  • The first numerical control machine tool was demonstrated in 1952 in the United States at the Massachusetts Institute of Technol
    14·1 answer
  • How many people are in Siver, on the game Valorant?
    14·1 answer
  • PLEASE HELP THANK YOU
    7·1 answer
  • Tamara is writing a program to organize students in a class and needs to use operators to organize student grades, then compare
    9·1 answer
  • Why are computer simulations useful in studying phenomena in the universe?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!