Question: eclaring and Initializing C + + Variables Declaring and Initializing C + + Variables NewAge.cpp + 1 / / This program calculates your age in

eclaring and Initializing C++ Variables Declaring and Initializing C++ Variables NewAge.cpp +1// This program calculates your age in the year 2050.2// Input: None 3// Output: Your current age followed by your age in 205041. Declare an integer variable named myNewAge .5 #include 6 using namespace std; 7 int main() I 8(// Declare and initialize your variables here 9101112 myNewAge - myCurrentAge +(2050- currentYear); 13142. Declare and initialize an integer variable named myCurrentAge. Initialize this variable with your current age. 3. Declare and initialize an integer variable named currentYear. Initialize this variable with the value of the current year. Use four digits for the year. cout <<"My Current Age is "<< myCurrentAge << endl; cout << "I will be "<< myNewAge <<" in 2050."<< endl; 151617 return; 18) w Type here to search

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!