Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with C++ coding, its a basic code but I don't know how to write it. If I saw the answer I'd understand

I need help with C++ coding, its a basic code but I don't know how to write it. If I saw the answer I'd understand it alot better.

Class,

Create a C/C++ program that does the following tasks.

  1. Create a variable and assign your name to it.
  2. Create a variable named yearFutureand assign it the value 2040.
  3. Create a variable named currentYear and assign the current 4 digit year to it.
  4. Create a variable named myAge and assign your current age in years to this variable.
  5. Create a variable named ageInFuture.
  6. Compute your age in the yearFuture and assign it to the variable ageIn2040.
    1. myAge + ( year2040 - currentYear);
  7. Display the following output - using the variables in the program. ( 2040 should refer to a variable )

My Name is XXXXX XXXX and I will be ## in the year 2040.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

What is cost plus pricing ?

Answered: 1 week ago

Question

1. What are the types of wastes that reach water bodies ?

Answered: 1 week ago

Question

Which type of soil has more ability to absorb water?

Answered: 1 week ago