My teacher wants us to make a program that goes through two lists of students, if you enter a 10 it should go through one list, and if you enter a 14 it should go through the other. She wants it to output the person who would be last in line and first in line if they were put in alphabetical order. She does not want it alphabetized. We have to use some form of loop. Here are her exact instructions:
A teacher has asked all her students to line up single file according to their first name. For example, in one class Amy will be at the front of the line and Yolanda will be at the end. Write a program that prompts the user to enter the number of students in the class, then loops to read in that many names. Once all the names have been read in, it reports which student would be at the front of the line and which one would be at the end of the line. You may assume that no two students have the same name.
Input Validation: Do no accept a number less than 1 or greater than 25 for the number of students.
The lists of students are in the two files I have.
Here is the program I have so far...but I do not know how to sort the names to get it to work. I've tried so many different things...please help?