Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ (I've been asking the same question over and over. Please answer when you really know how to do it..) Could anyone solve this problem?

C++ (I've been asking the same question over and over. Please answer when you really know how to do it..)

Could anyone solve this problem?

1. I don't want to change any code below

2. The code below solved 9 questions out of 10.

3. The only problem is that somehow one result comes out with " an option:"

image text in transcribed

image text in transcribed

#include #include #include using namespace std;

int main() { vector jerseyNumber; vector rating; int temp; for(int i = 1; i >temp; jerseyNumber.push_back(temp); cout>temp; rating.push_back(temp); cout

cout

do {

cout

cin>>option;

if(option == 'q' || option == 'Q') break; else switch(option)

{ case 'a': case 'A': cout>temp; jerseyNumber.push_back(temp); cout>temp; rating.push_back(temp); break; case 'd': case 'D': cout>temp; int i; for(i = 0; i >temp; for(int i = 0; i >temp; rating.at(i) = temp; break; } } break; case 'r': case 'R': cout>temp; cout temp) cout

}while(option != 'q' || option !='Q');

return 0; }

5. Compare output 84 7 23 4 4 5 30 2 Input 66 9 55 6 an option Enter anoter player's jersey number Enter another player s rating: MENU a Add player d Delete player u Update player rating r Output players above a rating o Output roster Quit Choose an option ROSTER Player 1 Jersey number 84, Rating 7 Your output ends with player 2 Jersey number 23, Rating 4 Player 3 Jersey number 4, Rating 5 player 4 Jersey number 30, Rating 2 Player 5 Jersey number 66 Rating 9 Player 6 Jersey number 55, Rating 6 MENU a Add player d Delete player u Update player rating

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

=+j Identify the challenges of training an international workforce.

Answered: 1 week ago