Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Basic Version please Change the previous lab as described below. The name of an input or output file can be stored in a variable.

c++ Basic Version please

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

Students also viewed these Databases questions