Write a program that accepts as input a string variable

Assignment Help C/C++ Programming
Reference no: EM13757888

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.

Reference no: EM13757888

Questions Cloud

How to talk about technology : Refer to the ERR article, "How to Talk About Technology," for communication strategies, including: Pictures, Analogies, Testimonials
Provide a complete program that performs substitution cipher : Provide a complete program that performs a simple substitution cipher. The program should take plain text and a shift value and produce the encrypted text. Then it should take encrypted text and a shift value and produce the plain text once again.
Relationship between strategic-financial planning : Write a 1,050-to-1,400 word paper in which you describe the relationship between strategic and financial planning. Include the following: A strategic planning initiative for the organization identified in the Week 2 assignment-Identify an initiat..
How the organization of time affect curriculum development : Then, discuss with your classmates how the following factors affect curriculum: Arrangement and usability of space, Organization of time and Appropriate, quality materials & equipment.
Write a program that accepts as input a string variable : Write a program that accepts as input a string variable called strFirstName, then another string variable called strLastName, and an integer variable called intAge.
Differences among these market structures : What are the conditions for an oligopolistic market? How would you explain the differences among these market structures? Identify which market structure your organization competes in and why you think so.
Choose google technologies would you like to research on : Find and choose 5 Google technologies would you like to research on. Share one interesting finding about each technology that you have chosen
Achieve through the use of its antitrust policy : What are the differences among horizontal, vertical, and conglomerate mergers? What does the U.S. government hope to achieve through the use of its antitrust policy?
How do delay jitter and packet loss affect voip calls : What is the difference between the SIP and RTP protocols used with VoIP? How do delay, jitter, and packet loss affect VoIP calls

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Generate an object-oriented design for a system

Generate an object-oriented design for a system that keeps tracks of your CD and DVD collection. Identify each of the classes, associated data, and operations for the classes.

  Loops and if conditions

Write a program that requests a password

  Program that prints the statement

Write a program that prints the statement "Learning new topics is Fun!" in a function called writeThoughts that is called by the main function.

  To overload a member function of the base class

To overload a member function of the base class A: the name of the function and the formal parameter list of the corresponding function in the derived class must be the same. B: the name of the function must be different

  Program that would display a letter to a friend

Writing a c++ program that would display a letter to a friend? It should have a proper format like name, friends name, address.....etc

  Write programme that allows a user to enter distinct words

Write a programme that allows a user to enter three distinct words and returns them as a single string

  Calculate the component voltages

Calculate the component voltages for the following series resonant RLC circuit

  How many times will the inner loops s be executed

How many times will the inner loop's S be executed? Show HOW you got that answer.

  Implement a function named sort

Write a function named sort that takes three integer parameters by reference.The function should rearrange the parameter values so that the first parameter gets set to the smallest value

  Make a c program that squares the number

Make a C program that accepts an integer value at the main method from the keyboard and in turn passes the value to a function that squares the number

  Generates numbers in the fibonacci sequence

Write a class called fibs that generates numbers in the Fibonacci sequence (each number is the sum of the previous two). The sequence starts 1, 1, 2, 3, 5, ...

  Copy the sample program and compile

What does the following program do?. Copy the sample program and compile it, then find the results. Submit a report which is more than one page length to explain how the program works and how you can improve it

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd