Question: 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

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

3.44 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem well write a program that accomplishes the requirement to display the first and second halves of both the firstname and lastname ... View full answer

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 Biology Questions!