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]
2 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]2 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 large class with 1,000 students took a quiz consisting of ten questions. To get an A, students needed to get 9 or 10 questions
VMariaS [17]

Answer:

a. 0.11

b. 110 students

c. 50 students

d. 0.46

e. 460 students

f. 540 students

g. 0.96

Explanation:

(See attachment below)

a. Probability that a student got an A

To get an A, the student needs to get 9 or 10 questions right.

That means we want P(X≥9);

P(X>9) = P(9)+P(10)

= 0.06+0.05=0.11

b. How many students got an A on the quiz

Total students = 1000

Probability of getting A = 0.11 ---- Calculated from (a)

Number of students = 0.11 * 1000

Number of students = 110 students

So,the number of students that got A is 110

c. How many students did not miss a single question

For a student not to miss a single question, then that student scores a total of 10 out of possible 10

P(10) = 0.05

Total Students = 1000

Number of Students = 0.05 * 1000

Number of Students = 50 students

We see that 5

d. Probability that a student pass the quiz

To pass, a student needed to get at least 6 questions right.

So we want P(X>=6);

P(X>=) =P(6)+P(7)+P(8)+P(9)+P(10)

=0.08+0.12+0.15+0.06+0.05=0.46

So, the probability of a student passing the quiz is 0.46

e. Number of students that pass the quiz

Total students = 1000

Probability of passing the quiz = 0.46 ----- Calculated from (d)

Number of students = 0.46 * 1000

Number of students = 460 students

So,the number of students that passed the test is 460

f. Number of students that failed the quiz

Total students = 1000

Total students that passed = 460 ----- Calculated from (e)

Number of students that failed = 1000 - 460

Number of students that failed = 540

So,the number of students that failed is 540

g. Probability that a student got at least one question right

This means that we want to solve for P(X>=1)

Using the complement rule,

P(X>=1) = 1 - P(X<1)

P(X>=1) = 1 - P(X=0)

P(X>=1) = 1 - 0.04

P(X>=1) = 0.96

7 0
2 years ago
Who is the inventor that created the light bulb
uranmaximum [27]

Answer:

Thomas Elva Edison

He invented light.

4 0
3 years ago
State five applications of thermochromic materials
rusak2 [61]

Explanation:

The end-use industries of thermochromic materials include packaging, printing & coating, medical, textile, industrial, and others. Printing & coating is the fastest-growing end-use industry of thermochromic materials owing to a significant increase in the demand for thermal paper for POS systems. The use of thermochromic materials is gaining momentum for interactive packaging that encourages consumers to take a product off the shelf and use it.

8 0
2 years ago
When does the vc-turbo engine use lower compression ratios?.
Veronika [31]

Answer:

Explanation:

The VC-T engine (for "variable compression, turbocharged") can adjust its compression ratio between 8:1 and 14:1 on the fly, offering high-compression efficiency under light loads and the low compression needed for turbocharged power under hard acceleration.

7 0
2 years ago
Given the following phasors and the information related to the frequency of that phasor, provide the corresponding time-domain r
Evgesh-ka [11]

Answer:

Explanation:

In Engineering and Physics a Phasor That is a portmanteau of phase vector, is a complex number that represents a sinusoidal function whose Amplitude (A), Angular Frequency (ω), and Initial Phase (θ) are Time-invariant.

For the step by step solution to the question you asked, go through the attached documents.

4 0
3 years ago
Other questions:
  • An immersion heater has a resistance of 50Ω and carries a current of 2.5A current. What will be the final temperature of 500 g o
    11·1 answer
  • A heat pump receives heat from a lake that has an average wintertime temperature of 6o C and supplies heat into a house having a
    12·1 answer
  • The air standard efficiency ofan Otto cycle compared to diesel cycle for thie given compression ratio is: (a) same (b) less (c)
    12·1 answer
  • Vital role of maritime english among seaferers
    13·1 answer
  • A steam power plant with a power output of 230 MW consumes coal at a rate of 60 tons/h. If the heating value of the coal is 30,0
    5·1 answer
  • What does an engineer do? List as many types of engineers as you can.
    9·1 answer
  • How much energy in joule is added to a 12 g of sample of aluminum (c=0.897 J/g ◦C) to raise the temperature from 20 ◦C to 45 ◦C?
    14·1 answer
  • How pine are processed ????
    10·1 answer
  • Conduct online research and write a short report on the origin and evolution of the meter as a measurement standard. Discuss how
    6·1 answer
  • Describe how you would control employee exposure to excessive noise in a mining environment
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!