ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 11 Weeks Ago, 1 Day Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 8.00

Write a program that will input two arrays of information

Write a program that will input two arrays of information. Each array will contain exactly 4floating point values. Your program will enter these values from standard input. Once the values have been read in, your program should call a function that will compute the inner product of these two arrays. The function should return the value back to the main program. The main program will then print out the value. You should not print the value out inside the inner product function. The inner product of two arrays is a single number obtained by multiplying corresponding elements and then adding up their sums.

E.g., if array u = (5, 1, 6, 2) and array v = (1, 2, 3, 4) then the inner product is 33

because (5 * 1) = 5 (1 * 2) = 2 (6 * 3) = 18 (2 * 4) = 8

and 5 + 2 + 18 + 8 is 33.

Your main function will call a function called inner that has the following declaration:

float inner ( float u[], float v[], int size ) ;

Do not hardcode the loop inside inner to go from 0 to 3.

It should go from 0 to size-1.

Answers

(11)
Status NEW Posted 09 May 2017 07:05 AM My Price 8.00

-----------

Not Rated(0)