I. Write a program that reads the names of 6 swimmers and the times that they sh

Sep 1, 2021 | Uncategorized

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 2013; 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.0B. 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.8C. 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

Don't use plagiarized sources. Get Your Custom Essay on
I. Write a program that reads the names of 6 swimmers and the times that they sh
Just from $12/Page
Order Essay
  

Why dont you let a reliable essay writing service handle your assignments ?