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

  What is wrong with this function

What is wrong with this function? Can you find problem in this code?

  Write a powershell script that contains cmdlets

Assignment : Write a PowerShell script that contains cmdlets (no aliases) that meets the following requirements: Create an script named xyz123_AD.ps1 that accomplished the following: Create user1_StudentID throughuser10_StudentID where StudentID is..

  Write a program that calculates the user''s bmi

Write a program that calculates the user's body mass index (BMI) and categorizes it as underweight, normal, overweight, or obese, based on the following table from the United States Centers for Disease Control

  Describe an example application of polymorphism

Provide and describe an example application of polymorphism that could be used in a program solution. List and describe the class relationships.

  Determine order in which constructors of class will execute

Suppose that an object of class three enters its scope, so the constructors of theses classes will execute. Determine the order in which the constructors of these classes will execute.

  Write a program to calculate the trajectory flight path of

write a program to calculate the trajectory flight path of a soccer ball when it is kicked by a player inside the field

  Where s is any string

Write a function detab(s, stop), where s is any string, and stop is a positive integer called tabstop size. This function should return a string which is like s.

  Use and provide information with minimal difficulty

Smartphones today have changed our ability to find, use and provide information with minimal difficulty, however, in the past ten years, smartphones have changed from single user oriented to multi user connectivity. For example, in our last class tim..

  Compute the average of an array of n 8-bit numbers

Write a program to compute the average of an array of N 8-bit numbers and store the result at $1000. The array is stored at memory locations starting from $1010. N is no larger than 255.

  Problem related to c programming

write a Grade Book program for his class to help him compute final grades. Design a program that asks for the student's name and four test grades. You are to display the student's name, four test grades, the average of the four test grades and the..

  Write a switch-case statement

Create a script named 'descent.m'. Give a brief but concrete example when switch?case statements should be preferred to if? elseif statements. Use block comments to enter your answer in the script.

  Write a class volumeofbox that calculate the volume

write a class VolumeOfBox that calculate the volume by this formula : length * breadth *

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