Programming /computer science

Programming /computer science

Instructions:

Please code in C# using visual studio

Please include screen shots of both programs working with each program working in a zip file.

 

Program 1

Your instructor enjoys running races of different distances. Write a program to allow him to calculate his pace for a race. Your program should ask for following:

 

The time in hours, minutes, and seconds

The distance of the race

If that distance is in km or miles    and should output the following:

The time input

The distance in miles The distance in km

The pace of the race in minutes and seconds per mileThe pace of the race in minutes and seconds per km

 

Paces should be displayed to the nearest seconds. Distances should be displayed to precisely 1 decimal place. Your calculations should be done at full precision. E.g:

1:53:30 (1 hour, 53 minutes, 30 seconds) for 13.1 miles (a half marathon) is 8:40 per mile (8 minute and 40 seconds) Your output should look like this

Time: 1:53:30

Distance in miles:  13.1 Distance in km: 21.1

Pace in minutes per mile: 8:40 Pace in minutes per km: 5:23

Program 2 

Your instructor runs a lot of marathons. Write a program to allow him to find his fastest, slowest and average time of up to 10 races.

 

Your program should ask for times for each race in hours, minutes and seconds. After 10 races have been entered or the user has typed ­1 (to indicate the end of input) you will provide the following output:

 

Race 1: {time}

Race 2: {time}   **FASTEST**

….

….

Race {n­1}: {time}           **SLOWEST** Race {n}: {time}

 

Average time: {time}

 

You will need to store the input in an array so that you can output them at the end. Obviously the words FASTEST and SLOWEST should be on the correct line. You may not use any built in functions on the arrays to calculate the fastest, slowest, and average. Average should be rounded to the closest second.

 

 

Separately zip the entire contents of each folder containing your project/

Project does not have any attached files

Order from us and get better grades. We are the service you have been looking for.