Question: C++ language: program to input 3 integers from a file and output the sum to the console. Program should prompt and input the filename from

C++ language:

program to input 3 integers from a file and output the sum to the console. Program should prompt and input the filename from the keyboard, followed by cout << endl. Program to check and make sure that the file was successfully opened. If the input file cannot be opened, output an error message and return 0; the format of the error message is **Error: unable to open input file 'filename'.

input example: suppose the file "input1.txt" contains the following values:

50 50 10 

Your program should behave as follows, assuming the user enters input1.txt as shown below:

Please enter input filename> input1.txt Sum=110

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!