1answer.
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]
3 years 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]3 years 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
Which of the following statements is correct?
Marina CMI [18]

Answer:

Free cash flow (FCF) is, essentially, the cash flow that is available for interest and dividends after the company has made the investments in current and fixed assets that are necessary to sustain ongoing operations. (A)

Explanation:

Option A- This statement is true.

Option B- This is false. After-tax operating Income is calculated as Operating profit less interest less Depreciation and less tax

Option C-This is false. They will have the same operating incomes. Operating income is calculated as Sales less operating cost.

Option D- False.

Option E- False.

8 0
3 years ago
The ________ value (or obtained value) is what we compute to help us determine if we should accept the null hypothesis or not.
Dennis_Churaev [7]
P value is another way to say obtained value
3 0
4 years ago
Debit CreditCash $2,870 Accounts Receivable $3,231 Supplies 800 Equipment 3,800 Accounts Payable 2,666 Unearned Service Revenue
nirvana33 [79]

Answer:

TRIAL BALANCE

Assets:

Cash $2,920

Accounts Receivable $3,051

Supplies $300

Equipment $4,300

Total assets 10,571

Liabilities + Stockholders' Equity

Accounts Payable $2,200

Unearned Service Revenue $875

Common Stock $6,000

Retained Earnings $1,496

Total liabilities + stockholders' equity 10,571

Explanation:

1.Cash received from a customer on account was debited for $570, and Accounts Receivable was credited for the same amount. The actual collection was for $750.

Dr Cash 180

    Cr Accounts receivable 180

2. The purchase of a computer printer on account for $500 was recorded as a debit to Supplies for $500 and a credit to Accounts Payable for $500.

Dr Equipment 500

    Cr Supplies 500

3. Services were performed on account for a client for $890. Accounts Receivable was debited for $890 and Service Revenue was credited for $89.

Dr Accounts receivable 0

    Cr Service revenue 801

4. A payment of $65 for telephone charges was recorded as a debit to Office Expense for $65 and a debit to Cash for $65.

Dr Office expense 0

    Cr Cash 130

5. When the Unearned Service Revenue account was reviewed, it was found that service revenue amounting to $325 was performed prior to June 30 (related to Unearned Service Revenue).

Dr Unearned service revenue 325

    Cr Service revenue 325

6. A debit posting to Salaries and Wages Expense of $670 was omitted.

Dr Wages expense 670

    Cr Cash 0

7. A payment on account for $206 was credited to Cash for $206 and credited to Accounts Payable for $260.

Dr Accounts payable 466

    Cr Cash 0

8. A dividend of $575 was debited to Salaries and Wages Expense for $575 and credited to Cash for $575.

Dr Retained earnings 575

    Cr Wages expense 575

Service Revenue 2,380 + 801 + 325 = 3,506

Salaries and Wages Expense 3,400 + 670 - 575 = 3,495

Office Expense 940

net loss -929

Cash $2,870 + 180 - 130 = 2,920

Accounts Receivable $3,231 - 180 = 3,051

Supplies 800 - 500 = 300

Equipment 3,800 + 500 = 4,300

Accounts Payable 2,666 - 466  = 2,200

Unearned Service Revenue 1,200 - 325 = 875

Common Stock 6,000

Retained Earnings 3,000 - 575 - 929 = 1,496

4 0
3 years ago
Name 3 outside financing sources
sukhopar [10]

Answer and explanation:

In the corporate world, outside or external financing resources refer to all the sources from where a business can obtain the necessary capital to handle its operations without using the firm's assets. Common examples of external financing resources are:

  • Venture Capitals:<em> funding performed at an initial stage of companies after making research on the market and the company. </em>
  • Term loans:<em> provided by financial institutions that profit from the interest rate established in the loan or assets as collateral in case of payment failure. </em>
  • Debt Factoring:<em> short-term financing in which an organization sells its account receivables at a discount.</em>
6 0
3 years ago
Ron is a sales representative for Staples. He works in a business-to-business environment trying to sell office supply products
grin007 [14]

Answer: C) ​Technical selling

Explanation:

Technical selling or technical sales is an act in which a sales person helps to address customer's needs by understanding what they needs which is a determinant of what product to buy.

Technical selling involves the sales personnel addressing the need of customers, explaining the type and features of the product they needs, network with them and make sure they are satisfied.

A technical sales person must have the ability for effective communication and have good interpersonal skills so as to maintain a good relationship with customers.

6 0
3 years ago
Other questions:
  • A key underlying assumption of MM Proposition I without taxes is that: corporations are all-equity financed. individuals can bor
    15·1 answer
  • What are 6 major forms of direct marketing?
    9·1 answer
  • stack of poles has 24 poles in the bottom row, 23 poles in the next row, and so on, with 9 poles in the top row. How many poles
    14·1 answer
  • Your grandmother has promised to give you $5,000 when you graduate from college. She is expecting you to graduate two years from
    8·1 answer
  • A sociologist wants to study popular attitudes and perceptions about astrology among college students in California. She believe
    6·1 answer
  • Sally’s Dress Shop, Inc. reports operating income of $200,000 and interest expense of $18,000. The average common stockholders’
    5·1 answer
  • Accumulated Depreciation is:a. contra asset account b. is used to show the amount of cost expiration of intangibles c. is the sa
    6·2 answers
  • Calculate Cash FlowsNature’s Way Inc. is planning to invest in new manufacturing equipment to make a new garden tool. The garden
    15·1 answer
  • Raymond Moss, vice president of Moss Auto Parts, gets an annual bonus of 15% of any income, before deducting bonus and income ta
    14·1 answer
  • Which of the following actions will help limit the access to your network?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!