On your mark. Get Set. Go [20 Points] Write a program in C++ that asks for the n
ID: 3674318 • Letter: O
Question
On your mark. Get Set. Go [20 Points]
Write a program in C++ that asks for the names of three runners and the time it took each of them to finish a race.
The program should display who came in first, second, and third place.
Assume time is different for each one of them, so there will not be any tie.
Input Validation: Only accept positive numbers for the times. INPUT FORMAT (values are example):
Enter name of runner 1: Usain Bolt Time taken by runner 1: 9.58
Enter name of runner 2: Asafa Powell Time taken by runner 2: 10.10
Enter name of runner 3: Tyson Gay Time taken by runner 3: 9.69
OUTPUT FORMAT: First Place: Usain Bolt Second Place: Tyson Gay Third Place: Asafa Powell
Explanation / Answer
#include using namespace std; int main() { int t1; string n1; int t2; string n2; int t3; string n3; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.