Write down a program that reads a person''s name

Assignment Help Computer Engineering
Reference no: EM1331961

Write a program that reads a person's name in the following format: first name, then middle name or initial, and then last name. The program then outputs the name in the following format:

Last_Name, First_Name Middle_Initial.

For example, the input
Mary Average User

should produce the output:
User, Mary A.

The input
Mary A. User

should also produce the output:
User, Mary A.

Your program should work the same and place a period after the middle initial even if the input did not contain a period. Your program should allow for users who give no middle name or middle initial. In that case, the output, of course, contains no middle name or initial. For example, the input
Mary User

should produce the output
User, Mary

If you are using C strings, assume that each name is at most 20 characters long. Alternatively, use the class string. Hint: You may want to use three string variables rather than one large string variable for the input. You may find it easier to not use getline.

Reference no: EM1331961

Questions Cloud

Write the thoughts according to you : All doctor offices have not become 100 percent computerized yet. You can still see good % of offices use manual patient record files indexed by the first letter of patients' last names.
Different forms of corruption : How does corruption come about within an organization? Explain in detail. What conditions must exist, or what factors allow corruption to seep into public organizations? Explain in detail.
Explain business systems and non-metric variables : Explain business systems and non-metric variables
How to an edited version of the same text to another file : create a program that reads text from one file and writes an edited version of the same text to another file.
Write down a program that reads a person''s name : Write down a program that reads a person's name.
Explain what are the similarities among brick and mortar : Explain what are the similarities among brick and mortar
Examining cultural and ethnic differences of countires : Examine the cultural and ethnic differences of the two selected countries and determining the appropriate negotiation tactic that would be most effective in reaching the objective.
U.s. border security : Prepare a comprehensive plan for U.S. border security. The plan will include concepts such as border security, immigration issues, economic impact and future political ramifications.
Preserve uppercase letters for the first word of sentence : create a program that can be used to train the user to use less sexist language by suggesting alternative versions of sentences given by the user.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Make the syntax for a 2d array which has four rows

Write down the syntax for a 2D array which has four rows. The first row will have 10 elements and the second row will have 5 elements. The third row will have 8 elements and the fourth row will have 12 elements.

  Requirements for telecommunications planning

Discuss what do you understand by the general estimate requirements for the enterprise telecommunications planning and also explain in detail the cable estimating procedures.

  Generate a database for the gps law firm

Generate a database for the GPS Law firm

  Program on bst

Program on BST

  What occurs in an infinite loop

What occurs in an infinite loop? Create your own Repeat-until repetition arrangement.

  Write down the definitions for a double-stack structure

Write down the definitions for  a double-stack structure

  What would be well suited for a neural network

Research the features of Cisco Meeting Place and evaluate them to Microsoft's offerings. What hardware is required to implement Cisco's product.

  Write down specification for the adt as a java interface

Write down specification for the ADT as a java interface

  What is the largest positive number

What is the largest positive number one can repent in an 8-bit 2's complement code ? write your result in binary and decimal.

  Creating the table

Build a table which summarizes the risks faced by the RMO for this new project. Involve four columns titled (1) Project risk, (2) Type of risk.

  Recovering passwords from protected files

Recognize the mismatched file headers to the extensions and discuss the techniques you may apply in order to recover the passwords from protected files.

  What is green computing and green communication technology

What is Green Computing and Green Communication technology.

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