answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sveta [45]
1 year ago
9

This program will store roster and rating information for a soccer team. coaches rate players during tryouts to ensure a balance

d team. (1) prompt the user to input five pairs of numbers: a player's jersey number (0 - 99) and the player's rating (1 - 9). store the jersey numbers in one int vector and the ratings in another int vector. output these vectors (i.e., output the roster). (3 pts) ex:
Business
1 answer:
Vedmedyk [2.9K]1 year ago
4 0

Answer:

Explanation:

#include <iostream>

#include <vector>

using namespace std;

int main() {

   vector<int> jerseyNumber;

   vector<int> rating;

   int temp;

   for (int i = 1; i <= 5; i++) {

       cout << "Enter player " << i

            << "'s jersey number: ";

       cin >> temp;

       jerseyNumber.push_back(temp);

       cout << "Enter player " << i

            << "'s rating: ";

       cin >> temp;

       rating.push_back(temp);

       cout << endl;

   }

   cout << "ROSTER" << endl;

   for (int i = 0; i < 5; i++)

       cout << "Player " << i + 1 << " -- "

            << "Jersey number: " << jerseyNumber.at(i)

            << ", Rating: " << rating.at(i) << endl;

   char option;

   '

   while (true) {

       cout << "MENU" << endl;

       cout << "a - Add player" << endl;

       cout << "d - Remove player" << endl;

       cout << "u - Update player rating" << endl;

       cout << "r - Output players above a rating"

            << endl;

       cout << "o - Output roster" << endl;

       cout << "q - Quit" << endl << endl;

       cout << "Choose an option: ";

       cin >> option;

       switch (option) {

           case 'a':

           case 'A':

               cout << "Enter a new player's"

                    << "jersey number: ";

               cin >> temp;

               jerseyNumber.push_back(temp);

               cout << "Enter the player's rating: ";

               cin >> temp;

               rating.push_back(temp);

               break;

           case 'd':

           case 'D':

               cout << "Enter a jersey number: ";

               cin >> temp;

               int i;

               for (i = 0; i < jerseyNumber.size();

                    i++) {

                   if (jerseyNumber.at(i) == temp) {

                       jerseyNumber.erase(

                               jerseyNumber.begin() + i);

                       rating.erase(rating.begin() + i);

                       break;

                   }

               }

               break;

           case 'u':

           case 'U':

               cout << "Enter a jersey number: ";

               cin >> temp;

               for (int i = 0; i < jerseyNumber.size();

                    i++) {

                   if (jerseyNumber.at(i) == temp) {

                       cout << "Enter a new rating "

                            << "for player: ";

                       cin >> temp;

                       rating.at(i) = temp;

                       break;

                   }

               }

               break;

           case 'r':

           case 'R':

               cout << "Enter a rating: ";

               cin >> temp;

               cout << "\nABOVE " << temp << endl;

               for (int i = 0; i < jerseyNumber.size();

                    i++)

                   if (rating.at(i) > temp)

                       cout << "Player " << i + 1

                            << " -- "

                            << "Jersey number: "

                            << jerseyNumber.at(i)

                            << ", Rating: "

                            << rating.at(i) << endl;

               break;

           case 'o':

           case 'O':

               cout << "ROSTER" << endl;

               for (int i = 0; i < jerseyNumber.size();

                    i++)

                   cout << "Player " << i + 1 << " -- "

                        << "Jersey number: "

                        << jerseyNumber.at(i) << ", Rating: "

                        << rating.at(i) << endl;

               break;

           case 'q':

               return 0;

           default:

               cout << "Invalid menu option."

                    << " Try again." << endl;

       }

   }

}

You might be interested in
You would like to have $50,000 saved at the end of Year 5. At the end of Year 2, you can deposit $7,500 for this purpose. If you
Helen [10]

Answer:

The amount that should be deposited today is $33254.58

Explanation:

The deposit should be such that the future value of the deposit made today and at the end of year 2 should be equal to $50000 after 5 years. Let the deposit made today be x. The equation for the future value will be,

50000 = x * (1+0.045)^5  +  7500 * (1+0.045)^3

50000 = x *  (1.045)^5  +  8558.745938

50000 - 8558.745938  =  x * (1.045)^5

41441.25406 / (1.045)^5  =  x

x = $33254.57769 rounded off to $33254.58

5 0
2 years ago
Alice works for a large advertising agency where she is hoping to be promoted to a management position. alice's mother and two s
Daniel [21]
I would say this could be a kind of statute of limitations whereby the potential for illness would only figure into the decision in the case of Alice and her present and past medical condition and not extend to her family propensities.
4 0
1 year ago
The following are a trial balance and several transactions that relate to Lewisville's Concert Hall Bond Fund:
Vera_Pavlovna [14]

Answer:

a. Journal entries

1. Estimated revenues (Dr.) $100,000

Estimated other financing sources (Dr.) $50,000

Appropriations (Cr.) $125,000

Fund Balance Budget (Cr.) $25,000

2. Cash (Dr.) $50,000

General Fund Transfer (Cr.) $50,000

3. Property Tax receivable (Dr.) $100,000

Uncollectable Taxes (Cr.) $5,000

Collectable Property taxes revenue (Cr.) $95,000

4. Cash (Dr.) $60,000

Collectable property tax revenue (Cr.) $60,000

5. Cash (Dr.) $1,000

Revenue From Investments (Cr.) $1,000

6. Cash (Dr.) $30,000

Collectable property tax revenue (Cr.) $30,000

7. Interest expense (Dr.) $37,500

Interest Payable (Cr.) $37,500

8. Fiscal Agent fee (Dr.) $500

Cash (Cr.) $500

9. Cash (Dr.) $1,000

Investment Revenue (Cr.) $1,000

10. Interest Expense (Dr.) $37,500

Principal payment (Dr.) $50,000

[Fiscal Agent] Cash (Cr.) $87,500

11. Investment Revenue Receivable (Dr.) $500

Investment Revenue (Cr.) $500

Explanation:

b. Trial Balance

Particulars : Debit (Dr.) $ ; Credit (Cr.) $

Cash: 76,500 ; 0

Property Taxes receivable 10,000 ; 0

Allowance for uncollectable property 0 ; 5,000

Investments 40,000 ; 0

Investment revenue receivable 500 ; 0

Restricted fund balance 0 ; 100,000

Revenue - property taxes 0 ; 95,000

Revenue- Investments  0 ; 2,500

Transfer to general fund 0 ; 50,000

Interest Expense 75,000 ; 0

Bond principal 50,000 ; 0

Fiscal agent fees 500 ; 0

Estimated revenues 100,000 ; 0

Estimated other financing sources 50,000 ; 0

Appropriations 0 ; 125,000

Fund balance Budget 0 ; 25,000

6 0
2 years ago
A competitive car wash currently hires 4 workers, who together can wash 80 cars per day. The market price of car washes is $5 pe
DENIUS [597]

Answer:

Number of car washed is 92

So option (a) is correct answer

Explanation:

It is given that 4 workers can wash 80 cars per day

Means initially 80 cars are washed per day

And it is given that rate of car wash is $5 per car

Now price of workers is $60 per day

As per car wash is $5

So number of extra car washed =\frac{60}{5}=12

So total number of car washed = 80 + 12 = 92 cars per day

So option (a) is correct answer

7 0
2 years ago
Colors and more is considering replacing the equipment it uses to produce crayons. the equipment would cost $1.37 million, have
MakcuM [25]

¿¿?¿???¿?????¿???¿??????????¿?????????????........???????¿I'm not really sure

0 0
1 year ago
Other questions:
  • Taylor wants to generate a graph to show how is she doing at saving. What tool should she use?
    11·2 answers
  • If you have a cb radio, you can turn to channel ___________ and request police assistance. 5 12 10 9
    7·1 answer
  • If walter's costs are typical in the industry, we would expect that in the long run:
    14·1 answer
  • Hettenhouse Company's perpetual preferred stock sells for $102.50 per share, and it pays a $9.50 annual dividend. If the company
    14·1 answer
  • Jasper Pernik is a currency speculator who enjoys "betting" on changes in the foreign currency exchange market. Currently the sp
    13·1 answer
  • Suppose the current spot rate for the Norwegian kroner is $1 = NKr6.6869. The expected inflation rate in Norway is 6 percent and
    15·1 answer
  • Diana is a personal trainer whose client Charles pays $80 per hour-long session. Charles values this service at $100 per hour, w
    7·1 answer
  • Johnny’s Drive-in pays its employees bi-weekly. The first payday of 2014 will be on January 3 and will compensate employees for
    13·1 answer
  • Consider these long-term investment data: • The price of a 10-year $100 par zero-coupon inflation-indexed bond is $84.49. • A re
    10·2 answers
  • Department A had a beginning inventory balance of 25 units which were 40% complete. During the accounting period, the department
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!