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
Can someone help me answer this, I can’t fail tysm :)
nalin [4]
Don’t know what the answer is but do you, I have the test for that today
5 0
3 years ago
How many 32 bit integers can be stored in 16 byte cache block in matlab?
Sladkaya [172]
Bytes have eight bits. 32 bits would be four bytes.
4 0
3 years ago
Which of the following was not important in the development of the internet?
lesantik [10]
D. Rise of NASA.Hope I helped.
8 0
3 years ago
Read 2 more answers
Why would students most likely need to collect data? Check all that apply
n200080 [17]
Well I would think all of them in some way. For the first one, students need to collect data (whether it’s mathematical, scientific, etc.) to answer a question. For the second one, they may need to know how much money is in there bank account or they may need to calculate a sale to order the item. For the third one, they may need statistical data to support a position. For the last one, a student could use technological data to be able to solve their problem sorting documents.
5 0
3 years ago
Read 2 more answers
Question in file i need this work done tonight
inysia [295]
This is to much work for 5 points cmon
3 0
2 years ago
Other questions:
  • How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
    9·1 answer
  • Translate each of these statements into logical expressions using predicates, quantifiers, and logical connectives. a) Something
    7·1 answer
  • Your friend Kayla is starting her own business and asks you whether she should set it up as a P2P network or as a client-server
    13·1 answer
  • Which device on a network performs network address translation?
    8·1 answer
  • To edit the color of the text in presentation software, choose the Font color command Text Color in the ________ ribbon toolbar.
    15·2 answers
  • What is the binary representation of the following hexadecimal numbers?
    8·1 answer
  • Which of these is an example of rebranding ?
    6·2 answers
  • 1. select the correct answer from the given options.
    5·1 answer
  • Consider this binary search tree:______.
    12·1 answer
  • Which of the following terms refers to the area of the hard drive used for virtual memory?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!