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
Which of the following is NOT an advantage of owning a car?
AnnyKZ [126]

Smaller down and monthly payments than leasing a car

Option A.

<u>Explanation:</u>

If you lease a car, then the amount of money that a person has to pay in the form of monthly payments and installments is less when compared to when a person owns a car.

When you own a car, the monthly payment made is more than the monthly payments compared to when the car has to be leased. This is the disadvantage of owning a car, that the payment is more to be made.

8 0
4 years ago
Social engineering attacks can be carried out:______.
Alik [6]
The answer most likely B NOT SURE )
3 0
3 years ago
Which of these is NOT an advantage of the impact of computer careers.
nikdorinn [45]
I believe the answer could be the first choice. I'm not quite sure, though
4 0
3 years ago
Read 2 more answers
The autocorrect feature can automatically capitalize the first letter in the names of days. true false
Westkost [7]
The answer is that it is true
3 0
3 years ago
1.
Anna11 [10]
1. True
2. False
3. True


Have a great day <3
3 0
3 years ago
Other questions:
  • Tim has an old server computer that his company uses as a backup. One of the hard drives has gone bad and needs to be replaced.
    13·1 answer
  • Okay so, not really a question but whatever it’s been bothering me.
    9·2 answers
  • A __________ network is good for connecting computers over boundaries.
    6·2 answers
  • Write any two use of computer in school​
    15·1 answer
  • Where does a computer store it’s information
    11·1 answer
  • 5. The best way to clear your Reader is to
    6·2 answers
  • The _____ is a blinking vertical line that indicates where the next typed character will appear. scroll box sheet tab insertion
    7·1 answer
  • )In a graph represented by adjacency matrix u can find all the neighbours of a given vertices in ____Operations
    6·1 answer
  • What is unique about the TODAY and NOW functions?
    15·2 answers
  • The Monte Carlo method is commonly used to approximate areas or volumes of shapes. In this problem, we will use Monte Carlo to f
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!