Question: 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
Get step-by-step solutions from verified subject matter experts
