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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:00
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
question
Computers and Technology, 24.06.2019 02:10
Consider the usual algorithm to convert an infix expression to a postfix expression. suppose that you have read 10 input characters during a conversion and that the stack now contains these symbols: (5 points) | | | + | | ( | bottom |_*_| now, suppose that you read and process the 11th symbol of the input. draw the stack for the case where the 11th symbol is
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
Your is an example of personal information that you should keep private.
Answers: 1
question
Computers and Technology, 24.06.2019 19:30
Can someone who is skilled at coding create me a java chess game. don't copy from online source codes. make it original ! : d
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
question
Physics, 31.07.2021 17:10
question
Mathematics, 31.07.2021 17:10
question
Mathematics, 31.07.2021 17:10
question
Mathematics, 31.07.2021 17:10
question
Physics, 31.07.2021 17:10
question
English, 31.07.2021 17:10
question
Mathematics, 31.07.2021 17:10
question
Biology, 31.07.2021 17:10