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
An ideal Carnot engine extracts of heat from a high-temperature reservoir at 1200 during each cycle, and rejects heat to a low-t
Brut [27]

Answer:

efficiency of the engine is 0.4167

Explanation:

given data

T high = 1200 K

T low = 700 K

solution

we get here efficiency that is express as

efficiency  = 1 - \frac{T\ low}{T \ high }    .........................1

put here value of both temperature we get efficiency  

efficiency  = 1 - \frac{700}{1200}

efficiency  = 1 - 0.58333

efficiency  = 0.4167

so efficiency of the engine is 0.4167

3 0
3 years ago
Manufacturers frequently make choices about their suppliers of raw materials based on their impact on society and the environmen
love history [14]
Manufacturers seek attention
4 0
3 years ago
A compressor operates at steady state with Refrigerant 134a as the working fluid. The refrigerant enters at 0.24 MPa, 0°C, with
marissa [1.9K]

Answer:

POWER INPUT = 82.989 KW

Explanation:

For pressure P =0.24 MPa and T_1 = 0 DEGREE, Enthalapy _1 = 248.89 kJ/kg

For pressure P =1  MPa and T_1 = 50 DEGREE, Enthalapy _1 = 280.19 kJ/kg

Heat loss Q = 0.05w

Inlet diameter = 3 cm

exit diamter = 1.5  cm

volume of tank will be v = area * velocity

velocity at inlet= \frac{0.64\60 m/s}{ \frac{\pi}{4} (3\times 10^{-2})^2} = 15.09  m/s

velocity at outlet= \frac{0.64\60 m/s}{ \frac{\pi}{4} (1.5\times 10^{-2})^2} = 60.36  m/s

steady flow energy equation

E_{IN} = E_{OUT}

h_1 + \frac{v_1^2}{2g} +wc = h_2 + \frac{v_2^2}{2g} + 0.05wc

248.89 + \frac{15.09^2}{2} + wc = 280.18 + \frac{60.36^2}{2} + 0.05 wc

solving wc = 1830.64  kJ/kg

wc in KWH

we know thatwc = \dot m wc

       \dot m = 4.25 kg/m3 \times (0.64/60) m^3/s

\dot m = 0.04533  kg/s

wc = 0.04533 \times 1830.64 = 82.989 kW

5 0
4 years ago
Match each term in the second column with its correct definition in the first column.
Levart [38]

Answer:

The filled in the black answers is:

1. work book

2. Spreadsheet

3. Cell

4. Sheet tabs

5. Column

6. Row

7.Cell content

8. data

9. Formula

10. Constant value

11. Number value

12. Cell address

7 0
3 years ago
What advantage might there be to having the encoder located on the motor side of the gearhead instead of at the output shaft of
pickupchik [31]

The most accurate answer to that process is definitely precision. The Rotary encoder is an electro-mechanical device that converts the angular position or motion of a shaft or axle to analog or digital output signals. The efficiency of these devices is subject to the position and angle of the axis in front of the encoder.

Most cars use reduction systems in their gearboxes that convert a certain signal input into an output. Mechanically for example, a 20: 1 reduction box already infers that if there is a revolution in the input at the output there are 20. That same transferred to the encoder pulses would imply greater precision.

For example a decoder with 50 holes would have to read 1000 pulses (50 * 20) which is basically a degree of accuracy of 0.36 degrees. In this way it is possible to conclude that if the assembly of the encoder is carried out next to the motor and not at the output, it can be provided with greater precision at the time of reading.

7 0
4 years ago
Other questions:
  • Design a circuit with output f and inputs x1, x0, y1, and y0. Let X = x1x0 and Y = y1y0 represent two 2-digit binary numbers. Th
    10·1 answer
  • 1.00-L insulated bottle is full of tea at 90.08°C. You pour out one cup of tea and immediately screw the stopper back on the bot
    6·1 answer
  • Technician A states that a brake lathe is used to make a used brake rotor surface "like new". Technician B states that a brake l
    7·1 answer
  • I'm timed!!! Which of the following occupations uses recording technology to produce soundtracks for television programs or movi
    15·1 answer
  • Based on the pattern, what are the next two terms of the sequence? 9,94,916,964,9256,... A. 91024,94096 B. 9260,91028 C. 9260,92
    5·1 answer
  • _________ is an example of an electrical device.<br> A) PlugB) CordC) CableD) All of the above
    8·2 answers
  • Six 15-HP continuous-duty motors are connected to a common 480-volt feeder. The nameplate of each motor indicates: Full load amp
    10·1 answer
  • A structural member that has a straight longitudinal axis and constant cross section is best described as _______.
    8·1 answer
  • Consider fully developed flow in a circular pipe with negligible entrance effects. If the length of the pipe is doubled, the pre
    9·1 answer
  • Never operate electric tools outdoors or in wet conditions unless circuit is protected by what?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!