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
What is electrical energy used for?
FromTheMoon [43]

Answer:

to power devices  appliances and  some methods of transportation

Explanation:

6 0
3 years ago
Read 2 more answers
An aluminum alloy tube with an outside diameter of 3.50 in. and a wall thickness of 0.30 in. is used as a 14 ft long column. Ass
slega [8]

Answer:

slenderness ratio = 147.8

buckling load = 13.62 kips

Explanation:

Given data:

outside diameter is 3.50 inc

wall thickness 0.30 inc

length of column is 14 ft

E = 10,000 ksi

moment of inertia = \frac{\pi}{64 (D_O^2 -D_i^2)}

I = \frac{\pi}{64}(3.5^2 -2.9^2) = 3.894 in^4

Area = \frac{\pi}{4} (3.5^2 -2.9^2) = 3.015 in^2

radius = \sqrt{\frac{I}{A}}

r = \sqrt{\frac{3.894}{3.015}

r = 1.136 in

slenderness ratio = \frac{L}{r}

                              = \frac{14 *12}{1.136} = 147.8

buckling load = P_cr = \frac{\pi^2 EI}}{l^2}

P_{cr} = \frac{\pi^2 *10,000*3.844}{( 14\times 12)^2}

P_{cr} = 13.62 kips

3 0
3 years ago
The first step in treating shock is to
san4es73 [151]

Answer:

Lay the person down and elevate thier legs slightly.

Explanation:

5 0
3 years ago
What classification is an E7018?<br><br> will give brainliest
Hunter-Best [27]

Answer: E7018 is a low-hydrogen iron powder type electrode that produces high quality x-ray welds. It can be used in all positions on AC or DC reverse polarity welding current.

Explanation: Hope this helps

3 0
3 years ago
Analyse what effect the building of an airport may have on the decision of how to use an area of land nearby. (6)​
Sonja [21]
An effect might be a customer not wanting to buy it specifically because it’s by an airport, or maybe the customer wants to buy it because it’s right next to the airport, and a lot of people go to the airport so therefore they might go to the building next to the airport.
5 0
3 years ago
Other questions:
  • 5. Which of these least accurately describes what happens when abnormal combustion raises the temperature and pressure inside th
    8·1 answer
  • Two wastewater treatment plant workers (one male and one female) are exposed to hydrogen sulfide in confined spaces in the treat
    7·1 answer
  • given the classes above, what output is produced by the following code? meg[] elements ={new Lois(), new Stewie(), new Meg(), ne
    15·1 answer
  • While discussing run-flat tires: Technician A says that some are self-sealing tires and are designed to quickly and permanently
    15·1 answer
  • Wiring harnesses run
    12·1 answer
  • Which of the following tape measure techniques can be used to achieve accurate measurements? Choose all that apply.
    14·1 answer
  • Two aerial photographs were taken 30 seconds apart over one east-bound lane of l-80 near Grand Island, NE. The following results
    12·1 answer
  • Which of the following identifies one factor that causes conventional tillage to actually be good for the environment?
    7·1 answer
  • Please what is dif<br>ference between building technology and building engineering.​
    14·2 answers
  • Which system provides an easier way for people to communicate with a computer than a graphical user interface (GUI)?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!