Computers and Technology

LAB 2.3: File 1/0 - CSV update This program should:
• get names of input and output files from command line (NOT from user input)
• read in integers from a csv (comma-separated values) file into a vector
• compute the integer average of all of the values • convert each value in the vector to the difference between the original value and the average
• write the new values into a csv file
in c++#include #include #include using namespace std;int main(int argc, char *argv[]) {string inputFile;string outputFile;// Assign to inputFile value of 2nd command line argument// Assign to outputFile value of 3rd command line argument// Create input stream and open input csv file.// Verify file opened correctly.
// Output error message and return 1 if file stream did not open correctly.// Read in integers from input file to vector.// Close input stream.// Get integer average of all values read in.// Convert each value within vector to be the difference between the original value and the average.// Create output stream and open/create output csv file.// Verify file opened or was created correctly.// Output error message and return 1 if file stream did not open correctly.// Write converted values into ouptut csv file, each integer separated by a comma.// Close output stream. return 0;
}

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, azainababbas
Sam is a data analyst at an advertising firm. he often uses a spreadsheet that contains media ratings details. he would like to filter the spreadsheet data based on different filter criteria. which operators can he use to specify the combination of filter criteria? sam can use the ( blank ) operators to specify a combination of filter criteria.
Answers: 3
image
Computers and Technology, 22.06.2019 15:30, gudon986732
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, magicalunicorns47
Arecipients list has been loaded into a document. which commands should be clicked in order to filter the list so that letters will not be printed for recipients who live in a certain state? mailings tab, start mail merge, select recipients, type new list, then insert only contacts from the desired states mailings tab, rules, select recipients, use existing list, then choose a recipients list that includes only contacts in certain states mailings tab, select recipients, use existing list, rules, fill in, then type in certain states mailings tab, rules, skip record select “state” under field name, then type in the state name under “equal to”
Answers: 2
image
Computers and Technology, 24.06.2019 02:20, Jonny13Diaz
The first time a user launches the powerpoint program, which view is shown allowing the user to access recent presentations or create new presentations based on templates?
Answers: 1
Do you know the correct answer?
LAB 2.3: File 1/0 - CSV update This program should:
• get names of input and output files fr...

Questions in other subjects: