1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexgriva [62]
3 years ago
14

Write a function called arraySum() that takes two arguments: an integer array and the number of elements in the array. Have the

function return as its result the sum of the elements in the array
Engineering
1 answer:
Oduvanchick [21]3 years ago
5 0

Answer:

//Function is written using C++ Programming Language

// Comments are used for explanatory purpose

// The main method is not included

using namespace std;

// Declare arraySum with two arguments. The first represents the array name while the other

// Represents the number of elements

int arraySum(int arr[], int n)

{

int total = 0; // declare and Initialise total to 0

// Iterate through the array to calculate sum

for (int i = 0; i < n; i++) {

total += arr[i];

}

return total;

}

You might be interested in
Anyone have any good ways of revisiting <br> Or <br> Have any good study notes
Montano1993 [528]

Answer:

Write all notes in google docs

Explanation:

8 0
3 years ago
Why it is important to prepare first the materials and tools carpentry before doing the tasks?​
professor190 [17]

Answer:

It is important to inspect and check materials and tools for defects and damage before receiving them so that you can ask for replacements for those that you found .

Explanation:

8 0
2 years ago
Read 2 more answers
A 1-kW electric resistance heater submerged in 10-kg water is turned on and kept on for 15 min. During the process, 400 kJ of he
hichkok12 [17]

Answer:

ΔT=  11.94 °C

Explanation:

Given that

mass of water = 10 kh

Time t= 15 min

Heat lot from water = 400  KJ

Heat input to the water = 1  KW

Heat input the water= 1 x 15 x 60

                                =900 KJ

By heat balancing

Heat supply - heat rejected = Heat gain by water

As we know that heat capacity of water

C_p=4.187 \frac{KJ}{kg-K}

Q=mC_p\Delta T

Now by putting the values

900 - 400 = 10 x 4.187 x ΔT

So  rise in temperature of water ΔT=  11.94 °C

6 0
3 years ago
A body weighs 50 N and hangs from a spring with spring constant of 50 N/m. A dashpot is attached to the body. If the body is rai
lbvjy [14]

Answer:

a) 3.607 m

b) 1.5963 m

Explanation:

See that attached pictures for explanation.

3 0
3 years ago
A family member who hasn’t worked with computers before has decided to change jobs. You’ve been asked to explain some of the bas
-BARSIC- [3]
That due to the specific tasks that needs to be accomplished by each program to make an all encompassing program would be inefficient and full of bugs
6 0
3 years ago
Read 2 more answers
Other questions:
  • According to Manor, the example of the subway train in New York City is an example of which type of uniqueness?
    9·1 answer
  • ). A company periodically tests its product for tread wear under simulated conditions. Thirty random samples, each containing 5
    11·1 answer
  • Explain the use of remote sensing in surveying.​
    8·1 answer
  • What should you consider when choosing the type of hearing protection you use?
    15·1 answer
  • (1) Estimate the specific volume in cm3 /g for carbon dioxide at 310 K and (a) 8 bar (b) 75 bar by the virial equation and compa
    10·1 answer
  • 8. What is the density of an object with a mass of 290.5 g and volume of 83 cm 3?​
    13·1 answer
  • How to comment on brainly.com and I'm only 8-years-old so keep it simple please
    9·1 answer
  • What do u mean by double entry bookkeeping system?<br>u fellas don't spam pls​
    12·2 answers
  • Which level of acceleration should you use when accelerating on a short highway entry ramp?
    11·1 answer
  • A machine has an efficiency of 15%. If the energy input is 300 joules, how much useful energy is generated?(1 point).
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!