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]
4 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]4 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
A frying pan is connected to a 150-volt circuit. If the resistance of the frying pan is 25 ohms, how many amperes does the fryin
mario62 [17]

Answer:

Explanation:

Ohms Law I=E/R (resistive requires no power factor correction)

150/25= 6 amps

5 0
3 years ago
Jordan's dad made a new recipe for dinner. Jordan looked at the food and saw that it was white, yellow, and purple in color. She
zhenek [66]

Answer:

Jordan used her eyes to see the food, her touch to feel the food, and her nose to smell the food, and lastly, but most importantly, she used her mouth to taste the food.

7 0
2 years ago
A gas stream flowing at 1000 cfm with a particulate loading of 400 gr/ft3 discharges from a certain industrial plant through an
Makovka662 [10]

<u>Solution and Explanation:</u>

Volume of gas stream = 1000 cfm (Cubic Feet per Minute)

Particulate loading = 400 gr/ft3 (Grain/cubic feet)

1 gr/ft3 = 0.00220462 lb/ft3

Total weight of particulate matter = 1000 \mathrm{cfm} \times 400 \mathrm{gr} / \mathrm{tt} 3 \times .000142857 \mathrm{lb} / \mathrm{ft} 3 \times 60=3428.568 \mathrm{lb} / \mathrm{hr}

Cyclone is to 80 % efficient

So particulate remaining = 0.20 \times 3428.568 \mathrm{lb} / \mathrm{hr}=685.7136

emissions from this stack be limited to = 10.0 lb/hr

Particles to be remaining after wet scrubber = 10.0 lb/hr

So particles to be removed = 685.7136- 10 = 675.7136

Efficiency = output multiply with 100/input = 98.542 %

4 0
3 years ago
Please help <br> please i need to turn this in
grigory [225]

Answer:  101 means "introductory something". The allusion is to a college course with the course code 101, which in the American system and probably others indicates an introductory course, often with no prerequisites.

Explanation:

The name Topher means Christ Bearer and is of American origin. Topher is a name that's been used primarily by parents who are considering baby names for boys. Short form of Christopher.

I am not sure but if this is a trick question then the answer lies with his name, so this is the best I got. Hope it helps!

5 0
3 years ago
A 4-L pressure cooker has an operating pressure of 175 kPa. Initially, one-half of the volume is filled with liquid and the othe
vodomira [7]

Answer:

the highest rate of heat transfer allowed is 0.9306 kW

Explanation:

Given the data in the question;

Volume = 4L = 0.004 m³

V_f = V_g = 0.002 m³

Using Table ( saturated water - pressure table);

at pressure p = 175 kPa;

v_f = 0.001057 m³/kg

v_g = 1.0037 m³/kg

u_f = 486.82 kJ/kg

u_g 2524.5 kJ/kg

h_g = 2700.2 kJ/kg

So the initial mass of the water;

m₁ = V_f/v_f + V_g/v_g

we substitute

m₁ = 0.002/0.001057  + 0.002/1.0037

m₁ = 1.89414 kg

Now, the final mass will be;

m₂ = V/v_g

m₂ = 0.004 / 1.0037

m₂ = 0.003985 kg

Now, mass leaving the pressure cooker is;

m_{out = m₁ - m₂

m_{out = 1.89414  - 0.003985

m_{out = 1.890155 kg

so, Initial internal energy will be;

U₁ = m_fu_f + m_gu_g

U₁ = (V_f/v_f)u_f  + (V_g/v_g)u_g

we substitute

U₁ = (0.002/0.001057)(486.82)  + (0.002/1.0037)(2524.5)

U₁ = 921.135288 + 5.030387

U₁ = 926.165675 kJ

Now, using Energy balance;

E_{in -  E_{out = ΔE_{sys

QΔt - m_{outh_{out = m₂u₂ - U₁

QΔt - m_{outh_g = m₂u_g - U₁

given that time = 75 min = 75 × 60s = 4500 sec

so we substitute

Q(4500) - ( 1.890155 × 2700.2 ) = ( 0.003985 × 2524.5 ) - 926.165675

Q(4500) - 5103.7965 = 10.06013 - 926.165675

Q(4500) = 10.06013 - 926.165675 + 5103.7965

Q(4500) = 4187.690955

Q = 4187.690955 / 4500

Q = 0.9306 kW

Therefore, the highest rate of heat transfer allowed is 0.9306 kW

5 0
3 years ago
Other questions:
  • What are the four processes of the Carnot cycle? Sketch the Carnot cycle (a) on T-s (temperature - entropy) and P-V (pressure -
    7·1 answer
  • A high molecular weight hydrocarbon gas A is fed continuously into a heated mixed flow reactor (0.1liter) where it is thermally
    6·1 answer
  • A banked highway is designed for traffic moving at v = 88 km/h. The radius of the curve r = 314 m. show answer No Attempt 50% Pa
    5·2 answers
  • Reusable refrigerant containers under high-pressure must be hydrostatically tested how often?
    10·1 answer
  • Consider a steady-state experiment in which the observed current due to reduction of Ox to R is 85 mA/cm2. What is the concentra
    12·1 answer
  • Oliver is designing a new children’s slide to increase the speed at which a child can descend. His first design involved steel b
    15·1 answer
  • I wuv little space :)
    8·1 answer
  • All of these are true about using adhesive EXCEPT:
    6·1 answer
  • What is the name of the type of rocker arm stud that does not require a valve adjustment?
    12·1 answer
  • 3.8 LAB - Select lesson schedule with multiple joins
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!