Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:50, tommy4260
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, cheycheybabygirl01
How can the temperature of a room be raised by 5degreesf?
Answers: 1
image
Computers and Technology, 25.06.2019 03:30, eamber646
Which task should happen during the planning stage of a project
Answers: 2
image
Computers and Technology, 25.06.2019 23:10, Gbecky122
Type the correct answer in the box. spell all words correctly. george is creating a professional presentation for his client and wants to add his company's logo, some images, and a video of his manufacturing unit into a slide. which parts of the slide layout should he use? george must use the of the slide layout to insert the company logo, images, and the video into his slide.
Answers: 3
Do you know the correct answer?
Write a C++ program (rain function) which will allow a user to enter values for two arbitrary sized...

Questions in other subjects: