Question: in C# Write an application that creates an array which can store distances to different historical sights. Create a method to fill the array. Prompt
in C#
Write an application that creates an array which can store distances to different historical sights.
Create a method to fill the array.
Prompt the user to enter the distances
Use the following test data:
2.25 1.5 1.80 7.25 8.25
-Display a heading that includes your name. For example your heading might read: Software developed by: (your name)
-Create a method that uses a for loop and calculates and returns the sum of the values. Include an appropriate label with the calculated value
-Create a method that display all distances less than 5.0. Include an appropriate heading before the numbers are displayed.
-Create a method that uses a foreach loop to calculate and display the average of the values. Include an appropriate label with the calculated value
-Create a method that displays all values that are higher than the calculated average. Again, include an appropriate label with the calculated value.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
