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
A horizontal curve on a two-lane road is designed with a 2,300-ft radius, 12-ft lanes, and a 65-mph design speed. Determine the
Ierofanga [76]

Answer:

distance = 22.57 ft

superelevation rate = 2%

Explanation:

given data

radius = 2,300-ft

lanes width = 12-ft

no of lane = 2

design speed = 65-mph

solution

we get here sufficient sight distance SSD that is express as

SSD = 1.47 ut + \frac{u^2}{30(\frac{a}{g}\pm G)}     ..............1

here u is speed and t is reaction time i.e 2.5 second and a is here deceleration rate i.e 11.2 ft/s² and g is gravitational force i.e 32.2 ft/s² and G is gradient i.e 0 here

so put here value and we get

SSD = 1.47 × 65 ×2.5  + \frac{65^2}{30(\frac{11.2}{32.2}\pm 0)}

solve it we get

SSD = 644 ft  

so here minimum distance clear from the inside edge of the inside lane is

Ms = Rv ( 1  - cos (\frac{28.65 SSD}{Rv}) )        .....................2

here Rv is = R - one lane width

Rv = 2300 - 6 = 2294 ft

put value in equation 2 we get

Ms = 2294 ( 1  - cos (\frac{28.65 \times 664}{2294})  )  

solve it we get

Ms = 22.57 ft

and

superelevation rate for the curve will be here as

R  = \frac{u^2}{15(e+f)}  ..................3

here f is coefficient of friction that is 0.10

put here value and we get e

2300 = \frac{65^2}{15(e+0.10)}

solve it we get

e = 2%

3 0
3 years ago
Storm sewer backup causes your basement to flood at the steady rate of 1 in. of depth per hour. The basement floor area is 2600
Wittaler [7]

Answer:

attached below

Explanation:

4 0
3 years ago
Car insurance incentives and discounts are available depending on _____. A. school attendance and driver skill B. vehicle type a
WARRIOR [948]

Answer:D. Location, vehicle type, and driving habits

5 0
3 years ago
Read 2 more answers
The 15-kg block A slides on the surface for which µk = 0.3. The block has a velocity v = 10 m/s when it is s = 4 m from the 10-k
sammy [17]

Answer:

s_max = 0.8394m

Explanation:

From equilibrium of block, N = W = mg

Frictional force = μ_k•N = μ_k•mg

Since μ_k = 0.3,then F = 0.3mg

To determine the velocity of Block A just before collision, let's apply the principle of work and energy;

T1 + ΣU_1-2 = T2

So, (1/2)m_a•(v_ao)² - F•s =(1/2)m_a•(v_a1)²

Plugging in the relevant values to get ;

(1/2)•(15)•(10)² - (0.3•15•9.81•4) =(1/2)(15)•(v_a1)²

750 - 176.58 = 7.5(v_a1)²

v_a1 = 8.744 m/s

Using law of conservation of momentum;

Σ(m1v1) = Σ(m2v2)

Thus,

m_a•v_a1 + m_b•v_b1 = m_a•v_a2 + m_b•v_b2

Thus;

15(8.744) + 10(0) = 15(v_a2) + 10(v_b2)

Divide through by 5;

3(8.744) + 2(0) = 3(v_a2) + 2(v_b2)

Thus,

3(v_a2) + 2(v_b2) = 26.232 - - - (eq1)

Coefficient of restitution has a formula;

e = (v_b2 - v_a2)/(v_a1 - v_b1)

From the question, e = 0.6.

Thus;

0.6 = (v_b2 - v_a2)/(8.744 - 0)

0.6 x 8.744 = (v_b2 - v_a2)

(v_b2 - v_a2) = 5.246 - - - (eq2)

Solving eq(1) and 2 simultaneously, we have;

v_b2 = 8.394 m/s

v_a2 = 3.148 m/s

Now, to find maximum compression, let's apply conservation of energy on block B;

T1 + V1 = T2 + V2

Thus,

(1/2)m_b•(v_b2)² + (1/2)k(s_1)² = (1/2)m_b•(v_b'2)² + (1/2)k(s_max)²

(1/2)10•(8.394)² + (1/2)1000(0)² = (1/2)10•(0)² + (1/2)(1000)(s_max)²

500(s_max)² = 352.29618

(s_max)² = 352.29618/500

(s_max)² = 0.7046

s_max = 0.8394m

8 0
3 years ago
Need help solving math problem using integration
notka56 [123]
Ummm did you try to add or subtract and multiply or divide that can get your answer
8 0
2 years ago
Other questions:
  • Air is compressed adiabatically from p1 1 bar, T1 300 K to p2 15 bar, v2 0.1227 m3 /kg. The air is then cooled at constant volum
    13·1 answer
  • When a mesh in a circuit contains an independent or dependent current source, this leads to a special case of mesh-current analy
    14·1 answer
  • An op-amp is connected in an inverting configuration with R1 = 1kW and R2 = 10kW, and a load resistor connected at the output, R
    9·1 answer
  • Air enters the compressor of a cold air-standard Brayton cycle with regeneration and reheat at 100 kPa, 300 K, with a mass flow
    10·1 answer
  • 14. Tires are rotated to
    12·2 answers
  • What are the equipment requirements for windshields and side windows?
    13·1 answer
  • When could you use the engineering design process in your own life?
    9·1 answer
  • Guyss I seriously and urgently need help what are the steps to build a headgear ??​
    5·2 answers
  • Propose any improvements if there are any in brake system
    7·1 answer
  • As you push a toggle bolt into a wall, the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!