Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C# Please Assignment 5A:Names: In your lab, you learned how to sort an array of numbers. For this first part of the assignment, you will
C# Please
Assignment 5A:Names: In your lab, you learned how to sort an array of numbers. For this first part of the assignment, you will use Exchange Sort (which you learned about in your lab) to sort an array of letters. Write a program that prompts the user to enter 5 names. The names are stored in a string array of 5 elements and uses Exchange Sort to alphabetize the names and returns the names in alphabetical order. Note: If you are using Java, you need to call the compare TolgnoreCase() method to compare elements in the string array. If you are using C#, you will need to call the CompareTo() method. Note: If you are using C++, you need to use the string class. See the appendix for more information. Your output should look like the samples below. User input is in bold. Sample Output 1 Enter 5 names: Name 1: Tom Name 2: Jerry Name 3: Ginny Name 4: Kari Name 5: Edward Names in order are: Edward Ginny Jerry Kari Tom Sample Output 2 Enter 5 names: Name 1: jim Name 2: aaron Name 3: cole Name 4: travis Name 5: jIn Names in order are: aaron cole jim jIn travis
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started