Answered step by step
Verified Expert Solution
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.
- Create a variable and assign your name to it.
- Create a variable named yearFutureand assign it the value 2040.
- Create a variable named currentYear and assign the current 4 digit year to it.
- Create a variable named myAge and assign your current age in years to this variable.
- Create a variable named ageInFuture.
- Compute your age in the yearFuture and assign it to the variable ageIn2040.
- myAge + ( year2040 - currentYear);
- 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started