using for loop program need to take string input (name) from user and compare it.
let say i enter 4 student
"John", "Peter", "Tom" and "Mark".
the alphabetical order will be "John", "Mark", "Peter", "Tom".
so the output will be
"The head of the line : John"
"The tail of the line : Tom"
it only take the first name of the order and the last name of the order.
meaning that to points out the first element and last element of an array.
anyone pls enlighten me :) thank u in advance