Write c++ program and test the following functions : void multiply (float a[ ], int n, float b [ ] ); The function multiplies the first n elements of a by corresponding first n elements of b.  For example: if a is the array {2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9}  and b is the array {4.0,-3.0, 2.0,-1.0, 0.0,0.0}  Then the call multiple (a, b, 5) would transform a  into the array {8.8, - 9.9, 8.8, - 5.5,0.0,7.7, 8.8,9.9}

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 8SA
icon
Related questions
Question

Write c++ program and test the following functions :

void multiply (float a[ ], int n, float b [ ] );

The function multiplies the first n elements of a by corresponding first n elements of b. 

For example: if a is the array {2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9} 

and b is the array {4.0,-3.0, 2.0,-1.0, 0.0,0.0} 

Then the call multiple (a, b, 5) would transform a  into the array {8.8, - 9.9, 8.8, - 5.5,0.0,7.7, 8.8,9.9} 

 

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning