Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions