Write a
If the first letter is a vowel, add “way” to the end.
For example, if the user inputs “Erin” for the first name and “Jones” for the last name, then the program should create a new string with the text “Erinway Onesjay” and print it.
Want to see the full answer?
Check out a sample textbook solutionChapter 8 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
C++ How to Program (10th Edition)
Starting Out with Programming Logic and Design (4th Edition)
Database Concepts (8th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
- Write a program that reads a string from the user containing a date in the form mm/dd/yyyy. It should print the date in the form March 12, 2014.arrow_forwardwrite a program that allows the input of a string from the user and prints the longest word in that string and its length. If there are multiple words with the same maximum length you must print the first one only.arrow_forwardWrite a program that takes a string and swap the first character and the last character of that string.arrow_forward
- Write a program that gets a string containing a person’s first, middle, and last names, and then display their first, middle, and last initials. For example, if the user enters John William Smith the program should display J. W. S.arrow_forwardWrite a program that reads a text (string) and prints the letter that starts the most number ofwords in that stringarrow_forward. Write a program that asks the user to input five numbers in the form of a string, and then prints the sum of those numbers.arrow_forward
- Write a program that takes input values as integer, checks the number is not less than 10 (otherwise take input again), and prints the previous 10 numbers i.e. 10, 9, 8, … Concatenate the integer and string values and print as a stringarrow_forwardWrite a program which takes a string from the user and replaces all occurrences of ‘b’ with ‘$’.arrow_forwardWrite a program whose input is a string which contains a character and a phrase, and whose output indicates the number of times the character appears in the phrase. The output should include the input character and use the plural form, n's, if the number of times the characters appears is not exactly 1. Ex: If the input is: n Monday the output is: 1 n Ex: If the input is: z Today is Monday the output is: 0 z's Ex: If the input is: n It's a sunny day the output is: 2 n's Case matters. n is different than N. Ex: If the input is: n Nobody the output is: 0 n'sarrow_forward
- Write a program that reads in a string containing three words separated by commasand then outputs that string with each word in a different line.arrow_forwardWrite a program to: Store the following message into a string (DO include periods!):I am the door of the sheep. All who came before me are thieves and robbers, I am the door. Insert the following message after the comma in the string.but the sheep did not listen to them. Output the string to the screen with a new line at the end. Replace the following words in the string.a. “I” and "me" with “Jesus”b. “am” with “is”Note: Make sure you only replace the word “ am“ and not the letters “am" that might appear in that sequence in another word Output the string with a new line at the end. The final output should be as follows: Jesus is the door of the sheep. All who came before Jesus are thieves and robbers, but the sheep did not listen to them. Jesus is the door. Write in C++arrow_forwardWrite a program to print all the unique characters in a String. For instance, if the input string is “abcb”, the output will be the characters ‘a’ and ‘c’ as they are unique. The character ‘b’ repeats twice and so it will not be printed.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education