Question: Homework Assignment 2 For this Assignment you will attach ONE file, your program file ( the . cpp file ) . DO NOT cut and

Homework Assignment 2
For this Assignment you will attach ONE file, your program file (the .cpp file). DO NOT cut and
paste your code into the Add Comments section of the Assignment or email your program, your
program will NOT be graded, and you will receive a zero for the assignment.
PROBLEM DESCRIPTION: Age Calculator (20 pts)
Write a program that will ask the user to input their name and birth year. Then, using the user's
inputs, you will calculate their current age and display it to the screen.
You will need to declare the following variables with the corresponding data types:
You must output the following title for your program and format your output as shown in the
SAMPLE OUTPUT below.
SAMPLE OUTPUT:
Microsoft Visual Studio Debug Console
AGE CALCULATOR
Please enter your full name:
John Doe
Please enter your birth year:
1990
Hi John Doe! You are 30 years old!
PSEUDO-CODE
A) Define variables for name, birthyear, currYear, and age.
a. Assign value of currYear variable to "actual" current year (hardcode).
B) Ask the user for their full name.
C) Read in the input from the user.
D) Ask the user for their birth year.
E) Read in the input from the user.
F) Calculate their age
G) Output their name and age as shown in the Sample Output
I need help on part a, for to assign value of currYear variable to "actual" current year (hardcore).
Homework Assignment 2 For this Assignment you

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 Programming Questions!