Question: Write a C++program that follows the following steps: INPUT 1. Prompt the user for the name of the first runner (type string variable) 2. Prompt
Write a C++program that follows the following steps: INPUT 1. Prompt the user for the name of the first runner (type string variable) 2. Prompt the user for runner 1's finishing time (type double variable) 3. Prompt the user for the name of the second runner (type string variable) 4. Prompt the user for runner 2's finishing time (type double variable) 5. Prompt the user for the name of the third runner (type string variable) 6. Prompt the user for runner 3'sfinishing time (type double variable) PROCESS 7. First, check if any of the times entered for any of the runners is less than zero. If this is the case, an error message should be displayed and then the program should end (see below). 8. If none of the times are negative, then do the following: 8A. Determine which runner made first place. (store this information in a variable of type string) 8B. Determine which runner made second place (store this information in a variable of type string) 8C. Determine which runner made third (last) place (store this information in a variable of type string) OUTPUT If any of the times entered for any of the runners are negative, then display the error message. 10. Otherwise display the following 10A. Display which runner made first place 10B. Display which runner made second place 10C. Display which runner made third (last) place
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
