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
Arlecino [84]
3 years ago
6

Write analgorithm and a C code to calculate the sum and average value of an array12elements.For example: Array_Temperaure=[10, 1

2, 13, 15, 20, 23, 25, 25, 25, 16, 13, 10}

Engineering
1 answer:
Lerok [7]3 years ago
4 0

Answer:

The solution of this code is given below in explanation section.

Explanation:

The C code of this problem is given below

/*******************************************************************************/

#include <stdio.h>

int main()

{

   int n=12, i;//n show the elements in array, while i will be used in for loop

   float Array_Temperaure[]={10, 12, 13, 15, 20, 23, 25, 25, 25, 16, 13, 10};//Array_Temperaure declared and initialized  

   float sum = 0.0;// sum variable declared and initialized

   float avg;// avg average variable declared and initialized

   

   for (i = 0; i < 12; ++i) //for loop to iterate through elements in Array_Temperaure.

   {  

       

       sum += Array_Temperaure[i];// in sum vaiable, Array_Temperaure numbers are added

   }

   avg = sum / n;// average is calculated

   printf("Sum = %.2f", sum);// sum is shown

   printf("\nAverage = %.2f", avg);// average is desplayed.

   return 0;

}

/*************************************************************** algorithm******************/

declare array Array_Temperaure[12];

declare int variable n ,i;

declare float variable sum and average;

for loop

          To iterate n time

                    sum the number of array at current index into total sum

calculate average;

display sum;

display average;

terminate the program;

You might be interested in
How is the energy harnessed and converted into useful energy?
garri49 [273]

Answer:

1. How energy is harnessed?  

Another way to tap solar energy is by collecting the sun's heat. Solar thermal power plants use heat from the sun to create steam, which can then be used to make electricity. On a smaller scale, solar panels that harness thermal energy can be used for heating water in homes, other buildings, and swimming pools.

2. How is solar energy converted into useful energy?

Solar panels convert the sun's light into usable solar energy using N-type and P-type semiconductor material. When sunlight is absorbed by these materials, the solar energy knocks electrons loose from their atoms, allowing the electrons to flow through the material to produce electricity.

Explanation:

hope it helps, please mark as brainliest

6 0
3 years ago
Two flat plates, separated by a space of 4 mm, are moving relative to each other at a velocity of 5 m/sec. The space between the
xenn [34]

Answer:

0.008

Explanation:

From the question, the parameters given are:

Velocity V = 5 m/s

Pressure = 10 pa

But pressure = F/A

10 = F/A

F = 10A

Substitute all the parameters into the formula below

Coefficient of viscosity (η) = F × r /[AV]

Where

F = tangential force,

r = distance between layers,

A = Area, and

V = velocity

(η) = 10A × 0.004 /[A × 5]

The A will cancel out

(η) = 10 × 0.004 /[5]

(η) = 0.04 /5

(η) = 0.008

Therefore, the coefficient of viscosity of the fluid is 0.008

5 0
3 years ago
For a turning operation, you have selected a high-speed steel (HSS) tool and turning a hot rolled free machining steel. Your dep
Alisiya [41]

Answer:

MRR = 1.984

Explanation:

Given that                              

Depth of cut ,d=0.105 in

Diameter D= 1 in

Speed V= 105 sfpm

feed f= 0.015 ipr

Now  the metal   removal  rate   given as

MRR= 12 f V d

d= depth of cut

V= Speed

f=Feed

MRR= Metal removal rate

By putting the values

MRR= 12 f V d

MRR = 12 x 0.015 x 105 x 0.105

MRR = 1.984

Therefore answer is -

1.944

8 0
3 years ago
Horizontal shear forces and, consequently, horizontal shear stresses are caused in a flexural member at those locations where th
jek_recluse [69]

Answer:

False

Explanation:

When the horizontal shear forces act on the surface there is transverse shear stress at a particular point which is equal in magnitude. Pure bending is less common than a non uniform bending because the beam is not in equilibrium.

5 0
3 years ago
Steam enters an adiabatic turbine at 10 MPa and 500°C and leaves at 10 kPa with a quality of 90 percent. Neglecting the changes
Anna35 [415]

Answer:

The mass flow rate of steam m=5.4 Kg/s

Explanation:

Given:

  At the inlet of turbine P=10 MPa  ,T=500 C

 AT the exit of turbine  P=10 KPa   ,x=0.9

 Required power=5 MW

From steam table

<u> At 10 MPa and 500 C:</u>

  h=3374 KJ/Kg  ,s=6.59 KJ/Kg-K  (Super heated steam table)

<u>At 10 KPa:</u>

h_g=2675.1 KJ/Kg, h_f=417.51  KJ/Kg

s_g= 7.3  KJ/Kg-K                ,s_f=1.3   KJ/Kg-K

So enthalpy of steam at the exit of turbine

h= h_f+x(h_g- h_f)

Now by putting the values

h= 417.51+0.9(2675.1- 417.51) KJ/Kg

h=2449.34  KJ/Kg

Lets take m is the mass flow rate of steam

So 5\times 10^3=m\times (3374-2449.34)

m=5.4 Kg/s

So the mass flow rate of steam m=5.4 Kg/s

8 0
4 years ago
Other questions:
  • What is temperature coefficient of resistance
    12·1 answer
  • A photovoltaic panel of dimension 2m×4m is installed on the
    14·1 answer
  • A level loop began and closed on BM_A (elevation = 823.368 ft). The plus and minus sights were kept approximately equal. Reading
    11·1 answer
  • What is the maximal coefficient of performance of a refrigerator which cools down 10 kg of water (and then ice) to -6C. Upper he
    11·1 answer
  • Calculate the volume of a hydraulic accumulator capable of delivering 5 liters of oil between 180 and 80 bar, using as a preload
    6·1 answer
  • A closed, rigid tank fitted with a paddle wheel contains 2.0 kg of air, initially at 200oC, 1 bar. During an interval of 10 minu
    8·1 answer
  • A motor driven water pump operates with an inlet pressure of 96 kPa (absolute) and mass flow rate of 120 kg/min. The motor consu
    7·1 answer
  • What type of plans have to do with earth, soil, excavation, and location<br> of a house on a lot?
    12·1 answer
  • Me ayudas plis noce ​
    14·1 answer
  • Hello , how are yall:))))
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!