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
olga55 [171]
3 years ago
12

Create a program named IntegerFacts whose Main() method declares an array of 10 integers.Call a method named FillArray to intera

ctively fill the array with any number of values up to 10 or until a sentinel value (999) is entered. If an entry is not an integer, reprompt the user.Call a second method named Statistics that accepts out parameters for the highest value in the array, lowest value in the array, sum of the values in the array, and arithmetic average.In the Main() method, display all the statistics in the following format: Note: The inputs were 1, 11, and 999The array has 2 valuesThe highest value is 11The lowest value is 1The sum of the values is 12The average is 6 using static System.Console;class IntegerFacts{ static void Main() { // Write your main here } public static int FillArray(int[] array) { } public static void Statistics(int[] array, int els, out int high, out int low, out int sum, out double avg) { } }

Engineering
1 answer:
musickatia [10]3 years ago
8 0

Answer:

C# codee

using System;

class IntegerFacts

{

static void Main()

{

int[] x = new int[10];

int sum = 0;

int siz = 0, high = 0, low = 0, avg = 0;

siz = FillArray(x);

Statistics(x, ref high, ref low, ref sum, ref avg, siz);

Console.Write("The highest value is " + high);

Console.Write("\nThe lowest value is " + low);

Console.Write("\nThe sum of the values is " + sum);

Console.Write("\nThe average is " + avg);

}

static void Statistics (int [] b, ref int h, ref int l, ref int s, ref int a, int size)

{

if (size == 0)

h = l = s = a = 0;

else

{

int i =0;

l = 999;

h = 0;

s = 0;

for (; i < size;++i)

{

if(b[i] > h)

h = b[i];

if(b[i] < l)

l = b[i];

s += b[i];

}

a = s / size;

}

}

static int FillArray (int[] a)

{

int i = 0, count = 0;

int intTemp =0 ;

string temp;

for(i = 0 ; i < 10 ; i++)

{

Console.Write("Enter element number"+(i+1) +" : ");

temp = Console.ReadLine();

if (int.TryParse(temp, out intTemp)) {

if (intTemp != 999)

{

a[i] = intTemp;

count++;

}

else

break;

}

else

{

Console.Write("\n\nOops.. You entered a wrong number. Try again \n\n");

i--;

}

}

return count;

}

}

Explanation:

The output of the above program is given in the attached file.

You might be interested in
What is 94*738^389428394
Lady_Fox [76]

Answer:

undefined

Explanation:

3 0
3 years ago
Which option shows the most valuable metallic properties
Rina8888 [55]

Malleable and ductile

non metals like plastic also have other properties but can't be malleable and ductile so they r most valuable metallic properties

6 0
1 year ago
Briefly explain how a jet moves
sergejj [24]

Answer:

Jet engines move the airplane forward with a great force that is produced by a tremendous thrust and causes the plane to fly very fast. All jet engines, which are also called gas turbines, work on the same principle. The engine sucks air in at the front with a fan. ... Spinning the turbine causes the compressor to spin.

Explanation:

yw

8 0
2 years ago
What is the best engineering job to do? Why?
allochka39001 [22]

Answer:

Any engineering job would be good YOU should be the one choosing which job.

Explanation:

Engineering is a great outlet for the imagination, and the perfect field for independent thinkers.

7 0
2 years ago
Read 2 more answers
1. Fatigue equations are based solely on theoretical assumptions. Experimental data is only used to verify the theory. a. True.b
Rainbow [258]

Answer:

1.  b. False

2. b. False

3.  b. False

4.  b. False

5. a. True

6. a. True

7.  b. False

8.  b. False

9. a. True

Explanation:

1. The fatigue properties of a material  are determined by series of test.

2. For most steels there is a level of fatigue limit below which a component will survive an infinite number of cycles, for aluminum and titanium a fatigue limit can not be defined, as failure will eventually occur after enough experienced cycles.

3. Although there is a cyclic stress, there are also stresses complex circumstances involving tensile to compresive and constant stress, where the solution is given into the mean stress and the stress amplitude or stress range, which is double the stress amplitude.

4. Low‐cycle fatigue is defined as few thousand cycles and high cycle fatigue is around more than 10,000 cycles.

5. The number of cycles for failure on brittle materials are less and determined compared with the ductile materials.

6.  The bending fatigue could be handled with specific load requirements  for uniform bending or axial fatigue of the same section size where the material near the surface is subjected to the  maximum stress, as in torsional fatigue, which can be performed on  axial-type specially designed machines also, using the proper fixtures if  the maximum twist required is small, in which linear motion is changed to rotational motion.

7.  A SN-Curve for a given material, is a plot displayed on logarithmic scales of the magnitude of an alternating stress in relation to the number of cycles to failure

8. The strain life method measures the strain resistance of local stresses and strains around stress concentration that controls the fatigue life of the material. It is more accurate than determining fatigue performance as the stress-life method is for long life millions of cycles in elastic stresses, but an it gets an effective stress concentration in fatigue loading.

9. Linear Elastic Fracture Mechanics (LEFM) states that the material is isotropic and linear elastic so, when the stresses near the crack surpasses the material fracture toughness, the crack grows.

7 0
3 years ago
Other questions:
  • A(n) _________ is a current greater than the equipment rated current or conductor ampacity, which is confined to the normal cond
    12·1 answer
  • The collar A, having a mass of 0.75 kg is attached to a spring having a stiffness of k = 200 N/m . When rod BC rotates about the
    15·1 answer
  • Emergency plans are being formulated so that rapid action can be taken in the event of an equipment failure. It is predicted tha
    12·2 answers
  • What are wheel cylinders used for?
    6·1 answer
  • The Hubble Space Telescope is an optical imaging telescope with extremely good angular resolution. Someone discovers an object t
    13·1 answer
  • What is the angle of the input
    12·1 answer
  • A silicon diode has a saturation current of 6 nA at 25 degrees Celcius. What is the saturation current at 100 degrees Celsius?
    15·1 answer
  • Need help with these 3 ez questions pls help me.
    6·1 answer
  • Technician A says that the distributor cap provides a connection point between the rotor and each individual cylinder plug wire.
    10·1 answer
  • Explain how you would solve for total resistance in a parallel circuit versus a series circuit. How would you apply and solve fo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!