Lily is preforming a survey about the students' majors in her class and needs you to write a program to help her. You plan on writing a program which asks for input and writes text files for further analysis later (Lab 7B).
The first line of input consists of a person's first name. Then, the second line of input will consist of that person's last name. Finally, the person will input their two-letter abbreviation for their major.
Your program should output two three different text files:
recent.txt should be overwritten with the most recent first and last
name inputted into the program. The first and last name should be separated
by a single space, and the line should end with a line terminator (
ASCII value \(10\)).
people.txt should be appendend to with the most recent entry in the
Last,First,Major. Make sure to include a line terminator at the end
of the line.
majors.txt should be appendend to with just the most recent major
entered. Make sure to include a line terminator at the end of the line.
Any output you make to the console will be ignored.
First Name: Jack Last Name: Rosenthal Major: CS
recent.txt is overwritten with the following contents:
people.txt has the following line appended:
majors.txt has the following line appended: