Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use c++ and explain code. thanks Question 5: Write a program that reads a person's name in the following format: first name, then middle name
use c++ and explain code. thanks
Question 5: 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. Note that your program should work the same and place a period after the middle initial even if the input did not contain a period. 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. Question 6: Write a program that reads in a line of text and outputs the line with all the digits in all integer numbers replaced with 'x'. Please enter a line of text: My userID is john17 and my 4 digit pin is 1234 which is secret My userID is john17 and my x digit pin is xxxx which is secret Notes: 1. If a digits is part of a word, then the digit is not changed to an 'x'. For example, john17 is NOT changed to johnxx. 2. You may assume that the text entered by the user will contain only letters (upper case or lower case), digits and spaces. 3. Think how to break down your implementation to functionsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started