Write a function findFirstPlace that receives a ID array of 3 strings representing marathon contestant names, a ID array

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a function findFirstPlace that receives a ID array of 3 strings representing marathon contestant names, a ID array

Post by answerhappygod »

Write A Function Findfirstplace That Receives A Id Array Of 3 Strings Representing Marathon Contestant Names A Id Array 1
Write A Function Findfirstplace That Receives A Id Array Of 3 Strings Representing Marathon Contestant Names A Id Array 1 (46.16 KiB) Viewed 62 times
using C++ and only use #include siostream> and
#include «string> and namespace std;
Write a function findFirstPlace that receives a ID array of 3 strings representing marathon contestant names, a ID array of 3 integers representing the marathon finish time (in minutes), and an integer representing the size of the arrays. void printFirstPlace (string names[], int minutes [], int size) The function should print the information of the contestant who came in first place (i.e., the contestant with the least time). In the main function, ask the user to input the name and time in minutes for each contestant, then call the function using these data. Sample outputs (user input is indicated as bold): Please enter contestant name: Ali Please enter the time (in minutes): 14 Please enter contestant name: Abdulrahman Please enter the time (in minutes): 13 Please enter contestant name: Mohamed Please enter the time in minutes): 15 The contestant in first place is Abdulrahman with 13 minutes.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply