Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MUST USE CODE BLOCKS !!! Write a program to read N data items into two arrays, X

ID: 3733664 • Letter: M

Question

MUST USE CODE BLOCKS !!!

Write a program to read N data items into two arrays, X and Y, of size 30. Store the product of the corresponding pairs of elements of X and Y in a third array Z, also of size 30. Print a three column table that displays the arrays X, Y, and Z. Then compute and print the square root of the sum of the items in array Z. Compute and print the average of the values in array Z and print all values above the average of array Z. Determine the smallest value in each array using only one function.

Use the two data files named DATAX.TXT and DATAY.TXT.

DATAX.TXT

DATAY.TXT.

All values must be clearly labeled in the output.

You are required to demonstrate your output in Lab.

Documentation will be 20% of your grade.

Your source code must contain the following documentation.

Header information: (Source Code and Output)

Your Name, course & section number, assignment number and due date.

A brief description of your assignment.

Variable dictionary: A brief description of every variable used in your program.

Comments related to input and output of data and all formulas used in your code.

shell

Explanation / Answer

#include #include #include int main() { std::vector numbers; { std::ifstream in ("input.txt"); int temp; while(in >> temp) { numbers.push_back(temp); } } //this closing brace destructs the std::ifstream and closes the file for(std::size_t i = 0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote