Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions