subject

Write a C++ program (rain function) which will allow a user to enter values for two arbitrary sized arrays v and w. then compute their dot product. The dot product calculation itself should be accomplished by a C++ function you write called dot, which will compute the dot product of two arrays of arbitrary size. Your main function should use the dot function as follows: cout << "The dot product is " << dot(v, w, n) << end1,
where n is the length of the arrays, read from the keyboard when the program runs. An example run of your program should look like:
Enter size of the arrays: 4
Enter the 4 elements of v: 1 2 3 4
Enter the 4 elements of w: -4 3 2 -1
The dot product is 4 Modify your code from
Write a C++ program (rain function) which will allow a user to enter values for two arbitrary sized arrays v and w. then compute their dot product. The dot product calculation itself should be accomplished by a C++ function you write called dot, which will compute the dot product of two arrays of arbitrary size. Your main function should use the dot function as follows:
cout << "The mean of v is " << stats(v, n, stdev);
cout << " and its standard deviation is " << stdev << end1;
cout << "The mean of v is " << stats(w, n, stdev);
cout << " and its standard deviation is " << stdev << end1;
A sample run of the program should look like
Enter size of the arrays: 4
Enter the 4 elements of v: 1 2 3 4
Enter the 4 elements of v: -4 3 2 -1
The mean of v is 2.5 and its standard deviation is 1.11803
The mean of v is 0 and its standard deviation is 2.73861

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, soapai
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, gymnast8900
Me if you do then you get 10 points and brainliest
Answers: 1
image
Computers and Technology, 24.06.2019 20:30, jalenevoyles
Which key should you press to leave the cell as it originally was? a. delete b. cancel c. backspace d. enter
Answers: 1
image
Computers and Technology, 25.06.2019 06:30, hayden5928
Which component is typically used as an amplifier a battery a transistor a microchip a diode
Answers: 1
You know the right answer?
Write a C++ program (rain function) which will allow a user to enter values for two arbitrary sized...

Questions in other subjects: