Question: String dataFileName and double mangoQuantity are read from input. Open dataFileName as an output file. If the file fails to open: Use cout to output

String dataFileName and double mangoQuantity are read from input. Open dataFileName as an output file. If the file fails to open:
Use cout to output dataFileName followed by ": error occurred while opening file" and a newline.
Terminate the program with 1 as the return value without writing to the file.
Otherwise, write mangoQuantity followed by " pounds of mangos" and a newline to the opened file

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!