Answer:
/*C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program */
//header files
#include <fstream>
#include<string>
#include <iostream>
#include <cstdlib> //needed for exit function
using namespace std;
//function prototype
int fileSum(string filename);
int main()
{
string filename;
cout << "Enter the name of the input file: ";
cin >> filename;
cout << "Sum: " << fileSum(filename) << endl;
system("pause");
return 0;
}
/*The function fileSum that takes the string filename and
count the sum of the values and returns the sum of the values*/
int fileSum(string filename)
{
//Create a ifstream object
ifstream fin;
//Open a file
fin.open(filename);
//Initialize sum to zero
int sum=0;
//Check if file exist
if(!fin)
{
cout<<"File does not exist ."<<endl;
system("pause");
exit(1);
}
else
{
int value;
//read file until end of file exist
while(fin>>value)
{
sum+=value;
}
}
return sum;
}//end of the fileSum
Explanation:
This is a C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program.
Check attachment for sample output screenshot.
False there are soooo many more people
Because look on our own Brainly there are more than 1,000 people
MARK ME BRAINLEST
Answer:
Discovery phase is the beginning step of a system development work. It is an important step for our professional staff, as people will need the information gathered to make informed technical advice for the construction effort and to provide an exact cost assessment.
Explanation:
Discovery regulates our organization with the customer’s requirements at the origin. The exercises and deliverables of outline Discovery are essential to the correctness of design evaluation and preparation, and we suggest that they always are completed for complicated custom requests with unknown and unsteady technical elements.
Markers are an often underutilized tool in the Premiere Pro CC toolbox. They are little colored tabs you can apply to both your timeline and your source clips to indicate important points in time with a color or note.
Answer:
Steps of the technological design process include: identify a problem, research the problem, generate possible solutions, select the best solution, create a model, test the model, refine and retest the model as needed, and communicate the final solution.
Explanation: