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
Depending on the model, all-electric vehicles can go about _______ miles on a single charge.
Lera25 [3.4K]

Answer:

D

Explanation:

Most electric vehicles can go at least 100.....few, if any, can go 400 or more on a single charge

6 0
2 years ago
ME<br> And what you know about love
antoniya [11.8K]

Answer:

Everything I got what you need

7 0
3 years ago
what is called periodic function give example? Plot the output which is started with zero degree for one coil rotating in the un
marta [7]

Answer:

A periodic function is a function that returns to its value over a certain period at regular intervals an example is the wave form of flux density (B) = sin <em>wt</em>

Explanation:

A periodic function is a function that returns to its value over a certain period at regular intervals an example is the wave form of flux density (B) = sin <em>wt</em>

attached to the answer is a free plot of the output starting with zero degree for one coil rotating in a uniform magnetic field

B ( wave flux density ) = Bm sin<em>wt  and w = </em>2\pif = \frac{2\pi }{T} rad/sec

3 0
3 years ago
You are provided the following information about a municipal wastewater treatment plant. This plant uses the traditional activat
3241004551 [841]

Answer:

Explanation:

Attached is the solution

5 0
3 years ago
Select the correct answer.
Bond [772]

Answer:

<em>d. </em><em>reducing </em><em>the </em><em>amount </em><em>of </em><em>recourses </em><em>spent </em><em>on </em><em>one </em><em>want </em><em>to </em><em>spend </em><em>more </em><em>on </em><em>another </em><em>want </em>

<em>brainliest</em><em>? </em><em>plz! </em>

4 0
3 years ago
Read 2 more answers
Other questions:
  • Water is the working fluid in an ideal Rankine cycle. Superheatedvapor enters the turbine at 10MPa, 480°C, and the condenser pre
    10·1 answer
  • If the Zener diode is connected<br>wrong polarity the voltage<br>across the load is?​
    11·1 answer
  • Rubber bushings are used on suspensions to
    9·1 answer
  • Biblical studies of john​
    11·1 answer
  • Choose the correct word or phrase to complete the sentence to explain human intervention in a machine system.
    13·1 answer
  • 9. An elevator on a construction site is being operated at rated capacity of 6 tons, and is supported by two standard steel cabl
    7·1 answer
  • I will mark brainliest.
    6·2 answers
  • A continuously variable transmission:
    13·1 answer
  • The driver should be able to see the ground within _____ to the front?
    14·1 answer
  • A 46.0-g meter stick is balanced at its midpoint (50.0 cm, zero point is a left end of stick). Then a 210.0-g weight is hung wit
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!