The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 2 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Please fix this code. I have tried my absolute hardest but I can not get the selection of 3 - to find the time of the skiers. Only Heidi's name is present and when I enter the name it tells me the name is not found. I have attached my code and what the output is supposed to look like and what mine looks like.
Â
Â
WHAT OUTPUT SHOULD LOOK LIKEWHAT MY OUTPUT LOOKS LIKE#include<iostream>#include<string>#include<iomanip>usingnamespacestd;doubleFastestSkier (double[],string[],int);// Fastest Skier FunctiondoubleAverageTime (double[],int);// Finding Average Time FunctionintSpecifcTime (double[],string[],int);// Finding Time based on Name FunctionintNameAndTime (double[],string[],int);// Listing All Skiers and their Timesintmain(){constintsize = 5.0;// 5 Arraysdoubletime [size] = {2.03,2.40,1.85,1.90,2.50};// Assigning Array Timesstringname [size] = {"Leela","Sarah","Anna","Keesha","Heidi"};// AssigningArray Namesintselect;±or(intcount=1;; count++){cout <<"Enter 1 to determine the ±astest Skier ";cout <<endl;cout <<"Enter 2 to calculate the average time ";cout <<endl;cout <<"Enter 3 to fnd the time o± a Skier ";// Menu ±orinputcout <<endl;cout <<"Enter 4 to display the list o± Skiers ";cout <<endl;cout <<"To exit enter any other number ";cout <<endl;cin >> select;// I± input is greater than 4 program will terminatei±(select > 4)break;switch(select){case1:FastestSkier (time,name, size - 1);break;
Attachments:
-----------