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
A particular electromagnetic wave travelling in vacuum is detected to have a frequency of 3 × 10 12 Hz. How much time will it ta
irina1246 [14]

3×10^-12 seconds

Explanation:

T=1/f

7 0
2 years ago
Where does Elizabeth want John to do and what does she want him to do there?​
ollegr [7]
What is the question?
8 0
3 years ago
Nc3
Masja [62]

please give a better explanation of what you want to be answered.

3 0
3 years ago
An engine has a piston with a surface area of 17.31 in2 and can travel 3.44 inches. What is the potential change in volume, disp
Katena32 [7]

Answer:

$$\begin{align*}

P(Y-X=m | Y > X) &= \sum_{k} P(Y-X=m, X=k | Y > X) \\ &= \sum_{k} P(Y-X=m | X=k, Y > X) P(X=k | Y > X) \\ &= \sum_{k} P(Y-k=m | Y > k) P(X=k | Y > X).\end{split}$$

Explanation:

\eqalign{

 P(Y-X=m\mid Y\gt X)

   &=\sum_kP(Y-X=m,X=k\mid Y\gt X)\cr

   &=\sum_kP(Y-X=m\mid X=k,Y\gt X)\,P(X=k\mid Y>X)\cr

   &=\sum_kP(Y-k=m\mid Y\gt k)\,P(X=k\mid Y\gt X)\cr

}

P(Y-X=m | Y > X) &= \sum_{k} P(Y-X=m, X=k | Y > X) \\ &= \sum_{k} P(Y-X=m | X=k, Y > X) P(X=k | Y > X) \\ &= \sum_{k} P(Y-k=m | Y > k) P(X=k | Y > X).\end{split}$$

5 0
3 years ago
An op-amp is connected in an inverting configuration with R1 = 1kW and R2 = 10kW, and a load resistor connected at the output, R
Svetllana [295]

Answer:

View Image

Explanation:

You didn't provide me a picture of the opamp.

I'm gonna assume that this is an ideal opamp, therefore the input impedance can be assumed to be ∞ . This basically implies that...

  1. no current will go in the inverting(-) and noninverting(+) side of the opamp
  2. V₊ = V₋  , so whatever voltage is at the noninverting side will also be the voltage at the inverting side

Since no current is going into the + and - side of the opamp, then

i₁ = i₂

Since V₊ is connected to ground (0V) then V₋ must also be 0V.

V₊ = V₋  = 0

Use whatever method you want to solve for v_out and v_in then divide them. There's so many different ways of solving this circuit.

You didn't give me what the input voltage was so I can't give you the entire answer. I'll just give you the equations needed to plug in your values to get your answers.

8 0
3 years ago
Other questions:
  • 4. Three routes connect an origin and a destination with performance functions tl = 8 + 0.5x1, t2 = 1 + 2x2, and t3 = 3 + 0.75x3
    9·1 answer
  • When storing used oil, it need to be kept in________ container?
    11·1 answer
  • What are the seven problem solving steps?
    12·1 answer
  • Automotive service P2 Wastewater Management and Handling Spins
    9·1 answer
  • A vernier caliper will measure in what ( URGENT)
    10·1 answer
  • When testing a compressor with an ohm meter, a technician read 2 ohms between the start terminal and the case of the compressor.
    5·1 answer
  • Zionjasean17 zionjasean17
    8·2 answers
  • Dndbgddbdbhfdhdhdhhfhffhfhhddhhdhdhdhdhd​
    11·2 answers
  • Jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
    12·2 answers
  • The regulator is closed when the adjusting screw is turned in (clockwise).
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!