A teacher has asked all her students to line up 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. Using C++, Write a program that allows the user to choose whether they want to enter the names manually, or if the application should get the student names from a .txt file. If they choose manually, the program should prompt the user to enter a number between 1 and 20 for the number of students in the class and then loop to read in that many names. Once all the names have been read in, it should report which student should be at the front of the line and which one would be at the end of the line. If they choose to get the names from a .txt file, the names should be read in from the file until there is no more data to read in. The program should display all of the names from the .txt file before displaying which student should be at the front of the line and which one would be at the end of the line. Names for the .txt file: Liam Olivia Noah Emma Oliver Charlotte Elijah Amelia James Ava William Sophia Benjamin Isabella Lucas Mia Henry Evelyn Theodore Harper
Please send me answer within 10 min!! I will rate you good for sure!!
A teacher has asked all her students to line up 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. Using C++, Write a
If they choose manually, the program should prompt the user to enter a number between 1 and 20 for the number of students in the class and then loop to read in that many names. Once all the names have been read in, it should report which student should be at the front of the line and which one would be at the end of the line.
If they choose to get the names from a .txt file, the names should be read in from the file until there is no more data to read in. The program should display all of the names from the .txt file before displaying which student should be at the front of the line and which one would be at the end of the line.
Names for the .txt file:
Liam
Olivia
Noah
Emma
Oliver
Charlotte
Elijah
Amelia
James
Ava
William
Sophia
Benjamin
Isabella
Lucas
Mia
Henry
Evelyn
Theodore
Harper
Step by step
Solved in 3 steps with 3 images