// This program calculates your age in the year 2050. // Input: None // Output: Your current age followed by your age in 2050 #include  using namespace std; int main() { myNewAge; myCurrentAge;...



// This program calculates your age in the year 2050.

// Input:  None

// Output: Your current age followed by your age in 2050



#include 

using namespace std;

int main()

{ myNewAge;

myCurrentAge;



   // Declare and initialize your variables here




   myNewAge = myCurrentAge + (2050 - currentYear);



   cout <><><>

   cout <><><><>



   return 0;

}


ng.cengage.com/static/nb/ui/evo/index.html?elSBN=97813372746098snapshotld%3D22228148id%3D107.<br>CENGAGE MINDTAP<br>Declaring and Initializing C++ Variables<br>Declaring and Initializing C++<br>NewAge.cpp<br>Variables<br>1// This progr.<br>pols<br>2 // Input: Nor<br>3// Output: You<br>Summary<br>5 #include ciost<br></><br>In this lab, you declare and initialize variables in a C++<br>6 using namespac<br>7 int main()<br>program. The program, which is saved in a file named<br>8 {myNewAge;<br>NewAge.cpp, calculates your age in the year 2050.<br>9 myCurrentAge;<br>10<br>Instructions<br>11<br>// Declare<br>12<br>1. Declare an integer variable named myNewAge.<br>13<br>14<br>myNewAge<br>2. Declare and initialize an integer variable named<br>15<br>16<br>cout <<My<br>nyCurrentAge . Initialize this variable with your<br>17<br>cout << I w<br>current age.<br>18<br>19<br>return 0;<br>3. Declare and initialize an integer variable named<br>20 }<br>currentYear. Initialize this variable with the value of<br>21<br>the current year. Use four digits for the year.<br>4. Execute the program by clicking the Run button at<br>the bottom of the screen.<br>Sample program execution:<br>My Current Age is 29.<br>I will be 65 in 2050.<br>Grading<br>When you have completed your program, click the<br>Submit button to record your score.<br>(7<br>!!<br>

Extracted text: ng.cengage.com/static/nb/ui/evo/index.html?elSBN=97813372746098snapshotld%3D22228148id%3D107. CENGAGE MINDTAP Declaring and Initializing C++ Variables Declaring and Initializing C++ NewAge.cpp Variables 1// This progr. pols 2 // Input: Nor 3// Output: You Summary 5 #include ciost In this lab, you declare and initialize variables in a C++ 6 using namespac 7 int main() program. The program, which is saved in a file named 8 {myNewAge; NewAge.cpp, calculates your age in the year 2050. 9 myCurrentAge; 10 Instructions 11 // Declare 12 1. Declare an integer variable named myNewAge. 13 14 myNewAge 2. Declare and initialize an integer variable named 15 16 cout < i w current age. 18 19 return 0; 3. declare and initialize an integer variable named 20 } currentyear. initialize this variable with the value of 21 the current year. use four digits for the year. 4. execute the program by clicking the run button at the bottom of the screen. sample program execution: my current age is 29. i will be 65 in 2050. grading when you have completed your program, click the submit button to record your score. (7 !! i="" w="" current="" age.="" 18="" 19="" return="" 0;="" 3.="" declare="" and="" initialize="" an="" integer="" variable="" named="" 20="" }="" currentyear.="" initialize="" this="" variable="" with="" the="" value="" of="" 21="" the="" current="" year.="" use="" four="" digits="" for="" the="" year.="" 4.="" execute="" the="" program="" by="" clicking="" the="" run="" button="" at="" the="" bottom="" of="" the="" screen.="" sample="" program="" execution:="" my="" current="" age="" is="" 29.="" i="" will="" be="" 65="" in="" 2050.="" grading="" when="" you="" have="" completed="" your="" program,="" click="" the="" submit="" button="" to="" record="" your="" score.="" (7="">
Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here