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
slamgirl [31]
3 years ago
12

C#: Arrays - Ask the user how many students names they want to store. You will create two parallel arrays (e.g. 2 arrays with th

e same size, the first array will hold all of the students first names and the second array will hold all of the students last names). Once the user has input all of the students first names last names, output all of the students names in the following format: Lastname, Firstname. You must use two separate loops, the first to store the values in the arrays and the second to output all of the names.
Engineering
1 answer:
zhenek [66]3 years ago
4 0

Answer:

  1. using System;      
  2. public class Program
  3. {
  4. public static void Main()
  5. {
  6.  Console.WriteLine("Enter number of students: ");
  7.  int num = Convert.ToInt32(Console.ReadLine());
  8.  string [] firstName = new string[num];
  9.  string [] lastName = new string[num];
  10.  
  11.  for(int i=0 ; i < num; i++){
  12.   Console.WriteLine("Enter first name: ");
  13.   firstName[i] = Console.ReadLine();
  14.    
  15.   Console.WriteLine("Enter last name: ");
  16.   lastName[i] = Console.ReadLine();
  17.  }
  18.  
  19.  for(int j=0; j < num; j++){
  20.   Console.WriteLine(lastName[j] + "," + firstName[j]);
  21.  }
  22. }
  23. }

Explanation:

Firstly, prompt user to enter number of student to be stored (Line 6- 7). Next, create two array, firstName and lastName with num size (Line 8-9).

Create a for-loop to repeat for num times and prompt user to enter first name and last name and then store them in the firstName and lastName array, respectively (Line 11 - 17).

Create another for loop to traverse through the lastName and firstName array and display the last name and first name by following the format given in the question (Line 19 - 21).

You might be interested in
Is an example of an electrical device.
Yuki888 [10]
I think that it is all of the above
5 0
3 years ago
Read 2 more answers
Exceeding critical mach may result in the onset of compressibility effects such as:______.
klio [65]

Answer:

Sound barrier.

Explanation:

Sound barrier is a sudden increase in drag and other effects when an aircraft travels faster than the speed of sound. Other undesirable effects are experienced in the transonic stage, such as relative air movement creating disruptive shock waves and turbulence. One of the adverse effect of this sound barrier in early plane designs was that at this speed, the weight of the engine required to power the aircraft would be too large for the aircraft to carry. Modern planes have designs that now combat most of these undesirable effects of the sound barrier.

4 0
3 years ago
The aluminum rod AB (G 5 27 GPa) is bonded to the brass rod BD (G 5 39 GPa). Knowing that portion CD of the brass rod is hollow
Temka [501]

Answer:

Qcd=0.01507rad

QT= 0.10509rad

Explanation:

The full details of the procedure and answer is attached.

7 0
3 years ago
Consider a regenerative gas-turbine power plant with two stages of compression and two stages of expansion. The overall pressure
iris [78.8K]

Answer: the minimum mass flow rate of air required to generate a power output of 105 MW is 238.2 kg/s

Explanation:

from the T-S diagram, we get the overall pressure ratio of the cycle is 9

Calculate the pressure ratio in each stage of compression and expansion. P1/P2 = P4/P3  = √9 = 3

P5/P6 = P7/P8  = √9 =3  

get the properties of air from, "TABLE A-17 Ideal-gas properties of air", in the text book.

At temperature T1 =300K

Specific enthalpy of air h1 = 300.19 kJ/kg

Relative pressure pr1 = 1.3860  

At temperature T5 = 1200 K

Specific enthalpy h5 = 1277.79 kJ/kg

Relative pressure pr5 = 238  

Calculate the relative pressure at state 2

Pr2 = (P2/P1) Pr5

Pr2 =3 x 1.3860 = 4.158  

get the two values of relative pressure between which the relative pressure at state 2 lies and take the corresponding values of specific enthalpy from, "TABLE A-17 Ideal-gas properties of air", in the text book.  

Relative pressure pr = 4.153

The corresponding specific enthalpy h = 411.12 kJ/kg  

Relative pressure pr = 4.522

The corresponding specific enthalpy h = 421.26 kJ/kg  

Find the specific enthalpy of state 2 by the method of interpolation

(h2 - 411.12) / ( 421.26 - 411.12) =  

(4.158 - 4.153) / (4.522 - 4.153 )

h2 - 411.12 = (421.26 - 411.12) ((4.158 - 4.153) / (4.522 - 4.153))  

h2 - 411.12 = 0.137

h2 = 411.257kJ/kg  

Calculate the relative pressure at state 6.

Pr6 = (P6/P5) Pr5

Pr6 = 1/3 x 238 = 79.33  

Obtain the two values of relative pressure between which the relative pressure at state 6 lies and take the corresponding values of specific enthalpy from, "TABLE A-17 Ideal-gas properties of air", in the text book.  

Relative pressure Pr = 75.29

The corresponding specific enthalpy h = 932.93 kJ/kg  

Relative pressure pr = 82.05

The corresponding specific enthalpy h = 955.38 kJ/kg  

Find the specific enthalpy of state 6 by the method of interpolation.

(h6 - 932.93) / ( 955.38 - 932.93) =  

(79.33 - 75.29) / ( 82.05 - 75.29 )

(h6 - 932.93) = ( 955.38 - 932.93) ((79.33 - 75.29) / ( 82.05 - 75.29 )

h6 - 932.93 = 13.427

h6 = 946.357 kJ/kg

Calculate the total work input of the first and second stage compressors

(Wcomp)in = 2(h2 - h1 ) = 2( 411.257 - 300.19 )

= 222.134 kJ/kg  

Calculate the total work output of the first and second stage turbines.

(Wturb)out = 2(h5 - h6) = 2( 1277.79 - 946.357 )

= 662.866 kJ/kg  

Calculate the net work done

Wnet = (Wturb)out  - (Wcomp)in

= 662.866 - 222.134

= 440.732 kJ/kg  

Calculate the minimum mass flow rate of air required to generate a power output of 105 MW

W = m × Wnet

(105 x 10³) kW = m(440.732 kJ/kg)

m = (105 x 10³) / 440.732

m = 238.2 kg/s

therefore the minimum mass flow rate of air required to generate a power output of 105 MW is 238.2 kg/s

4 0
3 years ago
Design a half-wave recti er which provides a peak voltage of 15 V, and anaverage voltage of 3.8 V when driven by a 120 V (rms) a
nirvana33 [79]

Answer:

You need a 120V to 24V commercial transformer  (transformer 1:5), a 100 ohms resistance, a 1.5 K ohms resistance and a diode with a minimum forward current of 20 mA (could be 1N4148)

Step by step design:

  1. Because you have a 120V AC voltage supply you need an efficient way to reduce that voltage as much as possible before passing to the rectifier, for that I recommend a standard 120V to 24V transformer.  120 Vrms = 85 V and 24 Vrms = 17V = Vin
  2. Because 17V is not 15V you still need a voltage divider to step down that voltage, for that we use R1 = 100Ω and R2 = 1.3KΩ. You need to remember that more than 1 V is going to be in the diode, so for our calculation we need to consider it. Vf = (V*R2)/(R1+R2), V = Vin - 1 = 17-1 = 16V and Vf = 15, Choosing a fix resistance R1 = 100Ω and solving the equation we find R2 = 1.5KΩ
  3. Finally to select the diode you need to calculate two times the maximum current and that would be the forward current (If) of your diode. Imax = Vf/R2 = 10mA and If = 2*Imax = 20mA

Our circuit meet the average voltage (Va) specification:

Va = (15)/(pi) = 4.77V considering the diode voltage or 3.77V without considering it

6 0
4 years ago
Other questions:
  • A pressure gage at the inlet to a gas compressor indicates that the gage pressure is 40.0 kPa. Atmospheric pressure is 1.01 bar.
    5·1 answer
  • A 0.39 percent Carbon hypoeutectoid plain-carbon steel is slowly cooled from 950 oC to a temperature just slightly below 723 oC.
    15·1 answer
  • Do you think the mining process is faster when you know in advance that the land must be restored? Explain.
    14·1 answer
  • 1. What are the usual symptoms of brake issues?​
    15·1 answer
  • Different Gauss quadrature formulae predict different values for the same integral a. True b. False
    11·1 answer
  • You are analyzing an open-return wind tunnel that intakes air at 20 m/s and 320K. When the flow exits the wind tunnel it is movi
    14·2 answers
  • (30 pts) A simply supported beam with a span L=20 ft and cross sectional dimensions: b=14 in; h=20 in; d=17.5 in. is reinforced
    13·1 answer
  • The design-bid-build model is prons to abuse because separation of phases facilitates the hiding of corrupt practices.
    7·2 answers
  • The following two DC motors are to be compared for certain application:
    13·1 answer
  • What is another term for the notes that a reader can add to text in a word-processing document?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!