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

Question #3: New Word Program (6 pts)
Write a program that prompts the user for four words.
Your program should behave as follow:
1. Display a welcome message.
2. Ask the user to prompt 3 words with at least 1 letter.
3. Ask the user to prompt 3 numbers, that should be less than the length of each
word to indicate length of substring in each word. For example, if the word is
Ann, then the entered number should be less than 3(the length of Ann).
4. Create a new word, which merges the substring of 3 words. If the entered
number is even, the substring starts from the first letter; if is it odd, the substring
starts from the second letter.
5. Display the resulting new word.
6. Display a farewell message, so that the user knows that the program has
terminated normally.
Restriction: This questions requires the use of the functions: length(), substr().
Assumption: Assume a perfect user who will always enter the correct input values.Welcome to New Word Program
Please enter 3 words : Mary Has Elephants
Please enter the 1st number less than 4: 3
Please enter the 2nd number less than 3: 2
Please enter the 3rd number less than 9: 6
The new word is: aryHaElepha
Thank you for using New Word Program!
Figure 4- Sample output #1 for Question 3Welcome to New Word Program
Please enter 3 words : How Are You???
Please enter the 1st number less than 3:1
Please enter the 2nd number less than 3:2
Please enter the 3rd number less than 6: 3
The new word is: oArou?
Thank you for using New Word Program!
Figure 5- Sample output #2 for Question 3
 Question #3: New Word Program (6 pts) Write a program that

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!