write a program in c 3

I. Write a program that reads the names of 6 swimmers and the times that they showed in a competition. The names and the times should be read from the file swim.txt – use the same structure of data that is shown below.

A. Write the function int findFastest that takes a decimal array of size 6 as an argument and returns the subscript of the smallest number in the array. For example, if the array holds the values 3.5 3.7 3.0 3.4 3.8 3.2 the function should return 2, because it is the subscript of the smallest value 3.0

B. Write the function int findSlowest that takes a decimal array of size 6 as an argument and returns the subscript of the highest number in the array. For example, if the array holds the values 3.5 3.7 3.0 3.4 3.8 3.2 the function should return 4, because it is the subscript of the highest value 3.8

C. In the main function, declare two arrays string SwimmerNames and decimal SwimmerTimes. The first array will store the names of the six swimmers, and the second array will store their times. Write a loop to load the data from the file into the arrays.

D. Use the two functions findFastest and findSlowest to display the names and the times of the fastest swimmer and the slowest swimmer.

Structure of the file swim.txt:

Anderson 3.5 Burns 3.7 Cole 3.0 Dover 3.4 Eastwood 3.8 Grimms 3.2

“Order a similar paper and get 20% discount on your first order with us Use the following coupon “GET20”