Question: 2. Write a program that accepts the firstname and the lastname of the user, and display the first half of the lastname, first half of

2. Write a program that accepts the firstname and the lastname of the user, and display the first half of the lastname, first half of the firstname, second half of the lastname and second half of the firstname. [Test your solution using this samples] a. Firstname Input: Juan Lastname Input: DelaCruz Output: DelaJuCruzan b. Firstname Input: Pedro Lastname Input: Penduko Output: PendPedukoro c. Firstname Input: Johann Lastname Input: Logan Output: LogJohanann d. Firstname Input: Mari Lastname Input: Santamaria Output: SantaMamariari [Hints] o To determine the first half of the name, you can use name[0, lengthOfName/2] o To determine the second half of the name, you can use name[lengthOfName/2, lengthOfName] o To determine the length of the name, you can use lengthOfName = GetLength(name)

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!