Need Help ?

Home / Expert Answers / Other / eclaring-and-initializing-c-variables-declaring-and-initializing-c-variables-newage-cpp-1-this-progr

(Answered): eclaring and Initializing C++ Variables Declaring and Initializing C++ Variables NewAge.cpp + 1 // ...




eclaring and Initializing C++ Variables Declaring and Initializing C++ Variables NewAge.cpp + 1 // This program calculates yo
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 2050 4 1. Declare an integer variable named myNewAge . 5 #include <iostream> 6 using namespace std; 7 int main() I 8( // Declare and initialize your variables here 9 10 11 12 myNewAge - myCurrentAge + (2050 - currentYear); 13 14 2. 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; 15 16 17 return; 18 ) w Type here to search


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer to eclaring and Initializing C++ Variables Declaring and Initializing C++ Variables NewAge.cpp + 1 // This program calculat...
We have an Answer from Expert

Buy This Answer $4

Place Order