# Write a program that calculates voltage from current and resistance values. Create three one-dimensional arrays named...

###### Question:

Write a program that calculates voltage from current and resistance values.

Create three one-dimensional arrays named current, resistance and voltage, each capable of holding 10 double-precision values. The values stored in current and resistance are as follows:
current = 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98
resistance = 4.0, 8.5, 6.0, 7.35, 9.0, 15.3, 3.0, 5.4, 2.9, 4.8

Have your program pass these three arrays to a function called calcVolts() which calculates the elements in the voltage array as the product of the equivalent elements in the current and resistance arrays, for example:
voltage[1] = current[1] * resistance[1]

Write the calcVolts() function (prototype, header, body) using pointers.

After calcVolts() has calculated and placed values in the voltage array, display the values in the arrays from within main() as follows:

voltage = current x resistance
42.48 10.63 4.00
126.56 14.89 8.50
79.26 13.21 6.00
...... ...... ......

#### Similar Solved Questions

##### EgxQLydsflgQ/viewform?hr_submission=Chgl KuH6VgSEAJH 2 points Which situation could be modeled as a linear equation? 1) The value...
egxQLydsflgQ/viewform?hr_submission=Chgl KuH6VgSEAJH 2 points Which situation could be modeled as a linear equation? 1) The value of a car decreases by 10% every year. 2) The number of fish in a lake doubles every 5 years. 3) Two liters of water evaporate from a pool every day. 4) The amount of caff...
##### A calendar year reporting company preparing its annual financial statements should use the phrase "For the...
A calendar year reporting company preparing its annual financial statements should use the phrase "For the twelve months ended as of December 31, 2017" in the heading of which financial statements? A. This heading would be used on the statement of cash flows. В. · This heading w...
##### I need solution Required information The following information applies to the questions displayed below. drift" caused...
I need solution Required information The following information applies to the questions displayed below. drift" caused by failure to maintain precise heat levels during the production process. Rejects from the 100 percent testing program can be reworked to acceptable levels if the defect is drif...