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
The end of a large tubular workpart is to be faced on a NC vertical boring mill. The part has an outside diameter of 38.0 in and
nata0808 [166]

Answer:

(a) the cutting time to complete the facing operation = 11.667mins

b) the cutting speeds and metal removal rates at the beginning= 12.89in³/min and end of the cut. = 8.143in³/min

Explanation:

check attached files below for answer.

5 0
2 years ago
vertical gate in an irrigation canal holds back 12.2 m of water. Find the average force on the gate if its width is 3.60 m. Repo
DanielleElmas [232]

Answer:

The right solution is "2625 kN".

Explanation:

According to the question,

The average pressure will be:

= density\times g\times \frac{h}{2}

By putting values, we get

= 1000\times 9.8\times \frac{12.2}{2}

= 1000\times 9.8\times 6.1

= 59780

hence,

The average force will be:

= Pressure\times Area

= 59780\times 3.6\times 12.2

= 2625537 \ N

Or,

= 2625 \ kN

5 0
2 years ago
The dot plot shows the number of cupcakes bought by each person who came to a bake sale.
Maslowich

The true statement about the dot plot is 1 has 4 and 0 dots.

Explanation:

  • after creating a Bar chart 4 is the right answer.
  • The highest among st all the other plots is 1 but 4 shows 3.
  • Taking an average from all the data points 3 comes to the right answer.
  • Median the central Mid-point is 3.
  • Mode also comes to 3.
  • It is skewed on the right due to the 1st one.
  • Skewed shows the data point either increasing or in decreasing.
  • There a to Bi- histograms which has two ups and downs.
  • The true statement has to be as Mean=Median=Mode is 3.

6 0
3 years ago
What type of bridge is the sunshine skyway bridge?
sdas [7]

Answer:

That's either a cable-stayed bridge or a cantilever bridge

6 0
2 years ago
What type of siege engines were used by Saladin to capture Jerusalem in 1187?
mariarad [96]

Answer:

LOTS

Explanation:

Catapults, Towers, and Trebuchets were all used by Saladin to capture Jerusalem in 1187

8 0
2 years ago
Other questions:
  • What is the major drawback in nanocrystalline alloys? a)- high brittleness b)-low hardness c)-rapid grain growth upon heating d)
    9·1 answer
  • Indicate on a tensile curve such quantities as yield stress, Young's modulus, UTS, toughness, point of necking, point of fractur
    7·1 answer
  • Una empresa realizó en el ejercicio de compras al contado por valor
    9·1 answer
  • A long homogeneous resistance wire of radius ro = 5 mm is being used to heat the air in a room by the passage of electric curren
    15·1 answer
  • Explain with schematics the operating principle of solid state lasers.
    9·1 answer
  • After a 65 newton weight has fallen freely from rest a vertical distance of 5.3 meters, the kinetic energy of the weight is
    12·1 answer
  • In order to avoid a rollover, what is the highest degree incline one should mow on? 10-degree incline 5-degree incline 30-degree
    15·1 answer
  • Find the rate of heat transfer through a 6 mm thick glass window with a cross-sectional area of 0.8 m2 if the inside temperature
    15·1 answer
  • Find the capacitance reactance of a 0.1 micro frequency capacitor 50Hz and at 200Hz​
    9·1 answer
  • What causes the charging system warning lamp to go out when the engine starts up?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!