Question: C++ Lab 4 Write to a text file (Lec. 4) New project - name it: Files New file - name it: Source.cpp Write a program
Lab 4 Write to a text file (Lec. 4) New project - name it: Files New file - name it: Source.cpp Write a program that produces this output /* OUTPUT: Enter 3 values of double data type: #1.) 4 #2.) 2 #3.) 25 The numbers have been written to a file: Press any key to continue */ 1.) First, open the C: drive and create a folder named: numbers 2.) The program should prompt the user to enter three numbers of double data type. 3.) Read in the 3 numbers and then write the numbers to a file named: numbers.txt The file is in folder named numbers on the C: drive. 4.) Include code to check to see if the file opened successfully. 5.) After the numbers have been written to a file, write a statement that outputs: The numbers have been written to a file. 6.) Close the file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
