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.
Answer:
Server
Explanation:
- it is an electronic device
- under control of another computer or human
- stored instructions as code
- accepts data from external source
- process the data it gets, for example filtering the data or modifying it
- produces information, for example AI created suggestions
- Stores Information on storage drives
A command you would use to perform a reverse lookup of the IP address 10.0.0.3 on a Linux system: dig -x 10.0.0.3.
<h3>What is a Linux command?</h3>
A Linux command can be defined as a software program that is designed and developed to run on the command line, in order to enable an administrator (end user) of a Linux network perform both basic and advanced tasks by only entering a line of text.
<h3>What is IP address?</h3>
IP address is an abbreviation for Internet protocol address and it can be defined as a unique set of numbers that are assigned to a computer, website or other network devices, in order to successfully differentiate them from one another in an active network system.
In Computer Networking, a command which an administrator (end user) would use to perform a reverse lookup of the IP address 10.0.0.3 on a Linux system is dig -x 10.0.0.3.
Read more on Linux commands here: brainly.com/question/25480553
#SPJ1
The correct answer for this question is IPO or also known as the "Input, Process, Output" Order. This sequential order is a method used by many, especially in terms of Software Engineering. This method is widely use to determine the structure of an informative processing programs and of other process known to programs as well.
c i belive that is the right answer