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
Daniel [21]
2 years ago
5

Edit the following statement so it uses the constant named YEAR:

Computers and Technology
1 answer:
Alenkasestr [34]2 years ago
4 0

Using the knowledge in computational language in C++ it is possible to write a code that will calculate the age of someone through the difference of years.

<h3>Writing code in C++ has:</h3>

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>int main()</em>

<em>{</em>

<em>//Declare variables</em>

<em>int myCurrentAge=29;</em>

<em>int myNewAge;</em>

<em>const int YEAR = 2050; //Declare constant YEAR=2050</em>

<em>int currentYear=2014;</em>

<em>myNewAge=myCurrentAge+(YEAR-currentYear); //calculate new age</em>

<em>cout<<"My Current Age is "<<myCurrentAge<<endl;</em>

<em>cout<<"I will be "<<myNewAge<<" in "<<YEAR<<"."<<endl; //display values on console</em>

<em>return 0;</em>

<em>}</em>

See more about C++ at brainly.com/question/19705654

#SPJ1

You might be interested in
_______ allows you to add formatting such as shapes and colors to text.
Svetach [21]
Worddesign allows you to add formatting such as shapes and colours to text
7 0
4 years ago
Consider an array of size nine with the numbers in the following order: 40, 60, 20, 80, 70, 90, 30, 10, 50. (a) Create the heap
Murljashka [212]

Answer:

See attached picture for heap creation steps.

10 comparisons were used.

Explanation:

See attached pictures.

4 0
3 years ago
Which sentences in the passage show the preventive measures to avoid data breach?
maria [59]
Turn off the whole computer or uninstall the thing that's causing malware (if that the data breach happened when you installed something).
6 0
3 years ago
When users talk about font size,
koban [17]

Answer:

The answer is 10......

4 0
3 years ago
Read 2 more answers
Greg works outside. He is often found cutting grass and making the local park grounds look nice for guests.
kvasek [131]

Answer:

C Landscaper

Explanation:

From what I know about landscapers and from the description that makes the most sense.

3 0
4 years ago
Other questions:
  • What should a system administrator use to disable access to a custom application for a group of users?
    5·1 answer
  • You have a folder on your Windows desktop system that you would like to share with members of your development team. Users need
    15·1 answer
  • Se citește un număr natural n cu cel mult 16 cifre. Fie q numărul de cifre ale numărului n. Prin eliminarea unei singure cifre d
    5·1 answer
  • A veteran had a VA loan using his full entitlement. He allows another veteran to assume the loan without VA approval. Could he i
    6·1 answer
  • Write a C++ program that takes two numbers from the command line and perform and arithmetic operations with them. Additionally y
    11·1 answer
  • The power saving state that saves all work to the hard drive and powers down the system is known by what term?
    11·1 answer
  • Write a complete method from the client perspective that duplicates each element in place in a ListInterface object. For example
    8·1 answer
  • HELP ASAP 50 POINTS AND BRAINLIST PLZ NO FAKE ANSWER I BEG!!!!!!!!!!!!!!!!!!!!!!!!!!
    15·2 answers
  • MSWord is a popular___________ program.​
    7·2 answers
  • _____ drives are storage drives that contain both solid-state storage and hard disks in an attempt to gain the speed and power o
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!