Question: No looping statements allowed (or needed). This question requires the use of the functions: length(), substring() Question 2 Letter Encryption (8 points) Write a program
No looping statements allowed (or needed). This question requires the use of the functions: length(), substring()
Question 2 Letter Encryption (8 points) Write a program that prompts the user for two words (W1 and W2) with 3 characters. Your program should behave as follow: 1. Display a welcome message.
2. Ask the user for the inputs of two words.
3. Display the lengths of both words.
4. Use a new string to merge two words. The new word should follow:
a. The sequence: 3rd character of W1 + 3rd character of W2 + 1st character of W1 + 1st character of W2 + 2nd character of W1 + 2nd character of W2, display the new generated word.
b. Swap the 2nd and 6th characters of the new word.
c. Swap the 1st and 5th characters of the new word.
5. Display the new word.
6. Display a farewell message, so that the user knows that the program has terminated normally.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
