Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, I don\'t know how to do the program for this question. Can youplease help me

ID: 3616849 • Letter: H

Question

Hi,
I don't know how to do the program for this question. Can youplease help me?

Write a program that willserve as a score board for a downhill ski competition. Th programwill let the judge enter a skier's race time and will display thistime with the current fastest time for the competition.
your program should include a sentinel controlled while loop toimplement this scheme.
Each iteration of the loop will read in skier's time and displaythat time and the fastest time. Note that you will have todetermine if he skier has just set the fastest time.

Explanation / Answer

#include<iostream.h>
using namespace std;
int main()
{
double ptime,fast=0.0;
cout<<"Enter the racers time (-ve Number to exit): ";
cin>>ptime;
fast=ptime;
do
{
if(ptime<fast)  
          fast=ptime;
   cout<<"current racer time:"<<ptime<<" Fastest Time:"<<fast<<endl;
   cout<<"Enter the racer time (-ve Number toexit): ";
   cin>>pttime;
   }while(ptime>0);
system("pause");
return 0;
} #include<iostream.h>
using namespace std;
int main()
{
double ptime,fast=0.0;
cout<<"Enter the racers time (-ve Number to exit): ";
cin>>ptime;
fast=ptime;
do
{
if(ptime<fast)  
          fast=ptime;
   cout<<"current racer time:"<<ptime<<" Fastest Time:"<<fast<<endl;
   cout<<"Enter the racer time (-ve Number toexit): ";
   cin>>pttime;
   }while(ptime>0);
system("pause");
return 0;
}
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote