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
On the pavement indicate that the adjacent lane is traveling in the same direction and passing is permitted
Mkey [24]

A broken yellow line on the pavement tells that the adjacent lane is traveling in the opposite direction and passing is permitted.

A broken white line on the pavement show that the adjacent lane is traveling in the same direction and passing is permitted.

<h3>What does pavement markings show?</h3>

Pavement markings are known to be tools that are used to pass infor or messages to roadway users.

Note  that they tell the part of the road that one need to use, give information about conditions ahead, and others

Note that A broken yellow line on the pavement tells that the adjacent lane is traveling in the opposite direction and passing is permitted.

Learn more about pavement markings from

brainly.com/question/10179521

#SPJ1

6 0
2 years ago
Consider an aircraft powered by a turbojet engine that has a pressure ratio of 9. The aircraft is stationary on the ground, held
77julia77 [94]

Answer:

The break force that must be applied to hold the plane stationary is 12597.4 N

Explanation:

p₁ = p₂, T₁ = T₂

\dfrac{T_{2}}{T_{1}} = \left (\dfrac{P_{2}}{P_{1}}  \right )^{\frac{K-1}{k} }

{T_{2}}{} = T_{1} \times \left (\dfrac{P_{2}}{P_{1}}  \right )^{\frac{K-1}{k} } = 280.15 \times \left (9  \right )^{\frac{1.333-1}{1.333} } = 485.03\ K

The heat supplied = \dot {m}_f × Heating value of jet fuel

The heat supplied = 0.5 kg/s × 42,700 kJ/kg = 21,350 kJ/s

The heat supplied = \dot m · c_p(T_3 - T_2)

\dot m = 20 kg/s

The heat supplied = 20*c_p(T_3 - T_2) = 21,350 kJ/s

c_p = 1.15 kJ/kg

T₃ = 21,350/(1.15*20) + 485.03 = 1413.3 K

p₂ = p₁ × p₂/p₁ = 95×9 = 855 kPa

p₃ = p₂ = 855 kPa

T₃ - T₄ = T₂ - T₁ = 485.03 - 280.15 = 204.88 K

T₄ = 1413.3 - 204.88 = 1208.42 K

\dfrac{T_5}{T_4}  = \dfrac{2}{1.333 + 1}

T₅ = 1208.42*(2/2.333) = 1035.94 K

C_j = \sqrt{\gamma \times R \times T_5} = √(1.333*287.3*1035.94) = 629.87 m/s

The total thrust = \dot m × C_j = 20*629.87 = 12597.4 N

Therefore;

The break force that must be applied to hold the plane stationary = 12597.4 N.

5 0
3 years ago
Steam at a pressure of 100 bar and temperature of 600 °C enters an adiabatic nozzle with a velocity of 35 m/s. It leaves the noz
butalik [34]

Answer:

Exit velocity V_2=1472.2 m/s.

Explanation:

Given:

At inlet:

P_1=100 bar,T_=600°C,V_1=35m/s

Properties of steam at 100 bar and 600°C

        h_1=3624.7\frac{KJ}{Kg}

At exit:Lets take exit velocity V_2

We know that if we know only one property inside the dome  then we will find the other property by using steam property table.

Given that dryness or quality of steam at the exit of nozzle  is 0.85 and pressure P=80 bar.So from steam table we can find the other properties.

Properties of saturated steam at 80 bar

   h_f= 1316.61\frac{KJ}{Kg} ,h_g= 2757.8\frac{KJ}{Kg}

So the enthalpy of steam at the exit of turbine  

h_2=h_f+x(h_g-h_f)\frac{KJ}{Kg}

h_2=1316.61+0.85(2757.8-1316.61)\frac{KJ}{Kg}

 h_2=2541.62\frac{KJ}{Kg}

Now from first law for open system

h_1+\dfrac{V_1^2}{2}+Q=h_2+\dfrac{V_2^2}{2}+w

In the case of adiabatic nozzle Q=0,W=0

3624.7+\dfrac{35^2}{2000}+0=2541.62+\dfrac{(V_2)^2}{2000}+0

V_2=1472.2 m/s

So Exit velocity V_2=1472.2 m/s.

4 0
3 years ago
Assume that television broadcasts are nonrival and nonexcludable (some TV stations, such as those on cable TV, are excludable, b
ryzh [129]

Answer: Advertising acts in a method similar to a fee. People who watch TV broadcasts must watch ADs. TV stations turn this into money by selling airtime to advertisers.

Explanation:

A non-rival good is a good whose consumption by one person does not reduce the remaining quantity available. An example is a street light.

For non-excludable goods, it is impossible to prevent everyone from enjoying the benefits of the good. An example is a lighthouse. This is where the free rider problem comes in.

A free rider is someone enjoying the benefits of a good without paying for it.  When a good is both non-rival and non-excludable, it is convenient for consumers to enjoy the benefit without paying for it.

If TV broadcasts are both non-rival and non-excludable, everybody can choose to become a free rider. Advertising can solve this problem by converting free riders to potential buyers of goods or services advertised during broadcasts. This way, stations can generate revenue by selling airtime.

3 0
3 years ago
Read 2 more answers
Hằng số phổ biến chất khí
drek231 [11]

Answer:

Business activities may broadly be classified into two categories namely (A) Industry and (B) Commerce. Industry involves production of goods and services whereas commerce is concerned with the distribution of goods and services.

Explanation:

hope helps

7 0
2 years ago
Other questions:
  • Determine if the following errors are systematic or random. Justify your response. (a) Effect of temperature on the circuitry of
    9·1 answer
  • A centrifugal pump is required to pump water to an open water link situated 4 km away from the location of the pump through a pi
    8·1 answer
  • A piston having a diameter of 5.48 inches and a length of 9.50 in slides downward with a
    13·1 answer
  • What are some advantages of generating electrical energy from tides instead of from fossil fuels
    13·1 answer
  • WHAT IS THE MOST POWERFUL PART IN A CAR
    13·2 answers
  • Which of these is shown in the animation below?
    6·1 answer
  • Marie and James are bubbling dry pure nitrogen (N2) through a tank of liquid water (H2O) containing ethane (C2H6). The vapor str
    5·1 answer
  • A closed, rigid tank is filled with a gas modeled as an ideal gas, initially at 27°C and gauge pressure of 300 kPa. The gas is h
    9·1 answer
  • A smooth ceramic sphere (SG 5 2.6) is immersed in a fl ow of water at 208C and 25 cm/s. What is the sphere diameter if it is enc
    11·1 answer
  • Need help, I will give cake :))<br><br> + branliest
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!