subject

Data 1 1 2 3 4 5 6
Data 2
6 4 8 10
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
First bullet point specifically
#include
#include sfstream>
#include
using namespace std;
int main(int args, char *argv[]) {
string inputFile;
string outputFile;
// Assign to inputFile value of 2nd command line argument
// Assign to output File 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 guptut csv file, each integer separated by a comma.
// Close output stream.
return ;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
Write a program that takes in 3 inputs [players (int type), expected game time (double type), team (char type)] and calculates actual game time (double) based on the following conditions: if the number of players or the expected game time is less than or equal to zero, it should output wrong input if the number of players is greater than 0 and less than or equal to 6 and if they are on the â€r’ or â€r’ team, their game time will be 10% faster. and if they are on the â€b’ or â€b’ team, their game time will be 15% faster. and if they are on the â€y’ or â€y’ team, their game time will be 20% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 6 but less than or equal to 12 and if they are on the â€r’ or â€r’ team, their game time will be 20% faster. and if they are on the â€b’ or â€b’ team, their game time will be 25% faster. and if they are on the â€y’ or â€y’ team their game time will be 30% faster. and if they are on any other team, they will play 0% faster. if the number of players is greater than 12 but less than or equal to 18 and if they are on the â€r’ or â€r’ team, their game time will be 30% faster. and if they are on the â€b’ or â€b’ team, their game time will be 35% faster. and if they are on the â€y’ or â€y’ team, their game time will
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
You know the right answer?
Data 1 1 2 3 4 5 6
Data 2
6 4 8 10
This program should get names of input and out...
Questions
question
Mathematics, 07.04.2021 03:10
question
Mathematics, 07.04.2021 03:10
question
Physics, 07.04.2021 03:10
Questions on the website: 13722362