Write a program that accepts as input a string variable


For this homework assignment you will:

Write a program that accepts as input a string variable called strFirstName, then another string variable called strLastName, and an integer variable called intAge.

If the age entered is below 30, it should say "You are still young".
If the age entered is below 40, it should say "You are almost hitting middle-age".
If the age entered is below 60, it should say "Welcome to middle-age!"
If the age entered is above 60 and below 80, it should say "Enjoying retirement?"
If the age entered is over 80, it should say "Golden years".

Write out to each file the following:

Full Name: David Wiesner

Age: 35

Comment: You are almost hitting middle-age.

Make sure you include at least 3 comments

The variables are named correctly

Program functions as expected

You used at least one if-else statement

You used a way to concatenate the firstname and lastname together to display the full name in the output.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a program that accepts as input a string variable
Reference No:- TGS01011045

Expected delivery within 24 Hours