Question
USING C# PROGRAMMING Arrays are considered to be fundamental data structures for storing a collection of items, each one being identified by its index. The
USING C# PROGRAMMING
Arrays are considered to be fundamental data structures for storing a collection of items, each one being identified by its index. The items in these collections can be stored in any given order. Arrays can be sorted using many different types of sorting algorithms that utilize various logic and control structures (loops). You are required to implement a basic console application that allows a user to sort an integer array using either a bubble sorting or selection sort algorithm approach. Your application should also allow the user to specify the sorting order (ascending or descending); hint, this can be done by specifying a parameter flag for your sort function.
Key Requirements -
Allow the user to enter 10 random integers
- Exception handling to ensure that unwanted inputs are caught (letters etc)
- Sort the array elements (in either Ascending or descending)
- Display both the unsorted list and sorted list back to the user
NB: Include your name as comments at the beginning of your source code for the main program.cs file
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