Final answer:
A Python program was provided to read three strings, sort them lexicographically, and print the string that would be second in order. The program uses list sorting and indexing to achieve the desired result.
Step-by-step explanation:
The student has asked for a program that reads three strings from the keyboard and displays the string that would be second if they were arranged lexographically. Lexicographic order is the way of ordering words based on the alphabetical order of their component letters. Below is an example program in Python that accomplishes this task:
# Program to display the second string in lexicographic order
strings = []
for _ in range(3):
strings.append(input('Enter a string: '))
strings.sort()
print('The second string in lexicographic order is:', strings[1])
This program first initializes an empty list called strings. It then uses a loop to read three strings from the keyboard and appends each to the list. The list is then sorted using the sort() method, and the second string (at index 1 since lists are zero-indexed in Python) is printed out.