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
What will happen if a shoe firm sells its shoes at a price lower than the opportunity cost of the inputs used in the production
Maslowich
Had to look for the options and here is my answer. What happens when a shoe firm puts its shoes on sale at a price that is lower than the opportunity cost of the inputs used in the process of production is that the firm will possibly make losses between the accounting and economic aspects. 
5 0
2 years ago
Pablo's demand for pizza is inelastic. If the price of pizza decrease​s, we can predict that Pablo will
kherson [118]

Answer:

C. eat more pizza and spend less on pizza than he did before the price decrease.

Explanation:

The inelastic means that when the elasticity is less than one

Since the demand for pizza is inelastic and the price of pizza decreases that would result in an increase in the quantity demanded of pizza.

Though the price of pizza decreases, the Pablo spend less than before as the price and the quantity demanded has an inverse relationship.

4 0
2 years ago
Use the information below for Harding Company to answer the question that follow. Harding Company Accounts payable $ 40,000 Acco
gtnhenbr [62]

Answer:

$131,000

Explanation:

The computation of the amount of quick assets is shown below:

Quick asset = Account  Receivable + Cash + marketable securities

= $65,000 + $30,000 + $36,000

= $131,000

We simply added the account receivable, cash and the marketable securities so that the quick assets could come plus it contains more liquidity that converted into cash in a very short period of time and the rest of the items are ignored as there are not relevant

7 0
2 years ago
You plan to visit Geneva, Switzerland in three months to attend an international business conference. You expect to incur the to
aliina [53]

Answer:

Therefore , the total future costs of buying sf 10000  = $6807.5

Explanation:

Premium = 0.05 (10000) = $500

Finding the value of $500 in 3 months = 500(1.015)= 507.5

The future expected spot rate is $0.63/sf, because this is less than exercise price, I will not exercise options. Instead I will expect to buy swiss franc at $0.63/sf. Since I will purchase sf 10000.

I will spend (0.63* 10000) = $6300.

Therefore , the total future costs of buying sf 10000 ,

$6300+$507.5 = 6807.5

5 0
2 years ago
What would a competitive retailer have to do to get your patronage?
SOVA2 [1]
For a competitive retailer to get a consumer's patronage, they should implement strategies of attracting their consumers of which will likely gain their support and make their consumers many than of their competitors. An example of this is by having to offer discounts in means of attracting other consumers to buy their products as a means of having to gain their support.
4 0
2 years ago
Other questions:
  • As part of a research study, dora is administered an intelligence test and obtains a particular score on this test. a few days l
    13·1 answer
  • Ben and Sam Jenkins formed a partnership. Ben contributed $8,000 cash and a used truck that originally cost $35,000 and had accu
    15·1 answer
  • Presented below are the production data for the first six months of the year for the mixed costs incurred by Gallup Company. Mon
    11·1 answer
  • Gundy Company expects to produce 1,252,800 units of Product XX in 2017. Monthly production is expected to range from 72,200 to 1
    6·1 answer
  • Duffert Industries has total assets of $1,080,000 and total current liabilities (consisting only of accounts payable and accrual
    14·1 answer
  • Maggie bought 20 shares of Google at the close price of $472.68. She bought
    5·1 answer
  • Arctic Cat sold Seneca Motor Sports a shipment of snowmobiles. The snowmobiles were delivered on January 1, 2021, and Arctic rec
    10·1 answer
  • Which services would a charitable organization provide? Check all that apply. preserving waterways operating a city aquarium ope
    5·1 answer
  • Smith and Johnson are partners. Smith's capital balance in the partnership is $56,000, and Johnson's capital balance $42,000. Sm
    10·1 answer
  • The cash account for Pala Medical Co. at June 30, 20Y1, indicated a balance of $97,456. The bank statement indicated a balance o
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!