Question
Create a C# Console Application, name it StudentsNames , that will prompt the user to enter the names of the students. If the user types
Create a C# Console Application, name it StudentsNames, that will prompt the user to enter the names of the students. If the user types -1, it means all students' names have been entered. You can create an array to store the students' names. Suppose there are at most 35 students and there can be 0 student.
After the user enters 35 names or the user types -1, print out all the names in the console window. Print out the actual number of students and print out the average length of the names.
If there is no student, you just need to print out "There is no student" in the console window.
If you can print out the names in the alphabetical order (ignore upper and lower case of the letters) as shown in the figure below, you will get 10 bonus points.
(Hint: string[] stuNames=...; Array.Sort(stuNames, (x, y) => String.Compare(x, y, StringComparison.CurrentCultureIgnoreCase)); This can sort the names in the alphabetical order)
////USE C#/////
This is an example of how it should look like.
12 z CA Microsoft Visual Studio Debug Console Input the full name of a new student: Input the full name of a new student: aa bb Input the full name of a new student: Abcc Input the full name of a new student: Jack Ma Input the full name of a new student: Daivd park Input the full name of a new student: bb aa Input the full name of a new student: -1 The stuents' names are: aa bb Abcc bb aa Daivd park Jack Ma .22 The number of students is 6 The average length of the students' names is: 6.167 Sin\Debug et6.0\EX1.exe (process 800) exited with code 0. Press any key to close this window . Make sure that your formatting and text matches what is found in the screenshots (Text messages DO NOT need to be exactly the same)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