Question: cannot add any #include.In C++. 6.9 LAB: Files 2 (output) Change the previous lab as described below. The name of an input or output file

cannot add any #include.In C++. 6.9 LAB: Files 2 (output) Change theprevious lab as described below. The name of an input or outputcannot add any #include.In C++.

6.9 LAB: Files 2 (output) Change the previous lab as described below. The name of an input or output file can be stored in a variable. Replace the named of the output file: student.txt with the name of the student. For instance, if the user enters Olivia Chen, the name of the output file is Olivia_Chen.txt. You may assume that each name consists of two words and that they are separated by one space. Notice that the space is to be replaced with underscore. Write a program that prompts the user to enter a student's name, major, hobby, and work. Here is an example of the program's screen: Name: Olivia Chen Major: computer science Hobby: hiking Work: mobile app developer Once the user has entered the requested input, the program creates an output file named Olivia_Chen.txt containing the following text using the input data: My name is I am a major and I like . After I graduate I hope to work as a . The actual file contents is shown below: My name is Olivia Chen. I am a computer science major and I like hiking. After I graduate I hope to work as a mobile app developer. Finally, display the name of the output file as shown below (including the double quotes): The output file is named "Olivia_Chen.txt". Input olivia Chen computer science hiking mobile app developer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!