Question: Question #3: New Word Program (6 pts) Write a program that prompts the user for two words with exactly 3 characters. Your program should behave

Question #3: New Word Program (6 pts) Write a program that prompts the user for two words with exactly 3 characters. Your program should behave as follow: 1. Display a welcome message. 2. Store the users two words in two different variables of type string. 3. Echo back to the user the word entered with the length of each word. 4. Use a new string to merge two words, following the sequence: 1st character of the first word + 1st character of the second word + 2nd character of the first word + 2nd character of the second word + 3rd character of the first word + 3rd character of the second word. 5. Display the resulting new word. 6. Display the new word with the 2nd letter and 2nd to last letter after swapping. 7. Display a farewell message, so that the user knows that the program has terminated normally. Restrictions: No looping statements allowed (or needed). This questions requires the use of the functions: length(), substr(). Assumption: Assume a perfect user who will always enter a word with exactly 3 characters.

Question #3: New Word Program (6 pts) Write a program that promptsthe user for two words with exactly 3 characters. Your program shouldbehave as follow: 1. Display a welcome message. 2. Store the users

Question #3: New Word Program (6 pts) Write a program that prompts the user for two words with exactly 3 characters. Your program should behave as follow: 1. Display a welcome message. 2. Store the user's two words in two different variables of type string. 3. Echo back to the user the word entered with the length of each word. 4. Use a new string to merge two words, following the sequence: 1st character of the first word + 1st character of the second word + 2nd character of the first word + 2nd character of the second word + 3rd character of the first word + 3rd character of the second word. 5. Display the resulting new word. 6. Display the new word with the 2nd letter and 2nd to last letter after swapping. 7. Display a farewell message, so that the user knows that the program has terminated normally. Restrictions: No looping statements allowed (or needed). This questions requires the use of the functions: length(), substr(). Assumption: Assume a perfect user who will always enter a word with exactly 3 characters. Following are three sample screen shots to illustrate the expected behavior of your program. Your program is to work with any word with 3 characters entered by the user. User input at the keyboard is marked with a red circle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!