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, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Need fast im timed in a paragraph of 125 words, explain at least three ways that engineers explore possible solutions in their projects.
Answers: 2
question
Computers and Technology, 24.06.2019 13:10
Write a program that has a conversation with the user. the program must ask for both strings and numbers as input. the program must ask for at least 4 different inputs from the user. the program must reuse at least 3 inputs in what it displays on the screen. the program must perform some form of arithmetic operation on the numbers the user inputs. turn in your .py file as well as a screenshot of your program's output. include comments in your code to explain how it works an example program run might look like (have fun with this and be creative): ‘what is your name? ’ “josh” ‘, josh. what is your favorite color? ’ “green” ‘mine too. do you also like ice cream? ’ “no” ‘josh, how old are you? ’ “40” ‘ and how many siblings do you have? ’’ “3” ‘that means you are one of 4 kid(s). is green the favorite color of anyone else in your house? ’
Answers: 3
question
Computers and Technology, 24.06.2019 14:00
Fast answer i need for apex ! smartphones should be banned from the classroom in public schools so that students cannot cheat on test so easily? which is an example of a counter argument to the thesis above? a.the classroom is a place for learning not for making phone calls b. smartphones are useful learning tools in the modern classroom c.banning smartphones will not students pay attention to teachers any better d. banning smartphones would decreased incidents of theft
Answers: 2
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
Biology, 19.01.2021 17:20
question
Biology, 19.01.2021 17:20
question
Biology, 19.01.2021 17:20
Questions on the website: 13722363