Reference no: EM131195236
C++ PROGRAMMING ASSIGNMENT-
Fifty people (50) completed the following questionnaire:
Are u interested in Very Much Moderately Not at all
Soccer? -------------- -------------- ----------
Rugby? -------------- -------------- ----------
Tennis? -------------- -------------- ----------
Athletics? -------------- -------------- ----------
Cycling? -------------- -------------- ----------
The information is encoded as follows: "if very much" has been marked, it is indicated by 1; if "moderately" has been marked, it is indicated by 2; if "not at all" it is indicated by 3.
Write a program containing a for loop (going from 1 to 50) where the answer (1, 2 or 3) of each respondent to each question is read in. (You will need five variables of type int for this). The program has to determine
- The number of people who are not interested in any of the five sports
- The number of people who are very interested in soccer, but not at all in rugby, and moderately or not at all interested in cycling
- The number of people who are very interested in both athletics and cycling, but only moderately or not at all in tennis and display the three totals. Use one nested if statement in your program. You should do some error checking: only 1 or 2 or 3 may be read in. (use a do ...while loop, keep prompting the use to enter 1 or 2 or 3 if something else has been type in until the input is correct.)
Reading of a collection of animal objects
: Allow the reading of a collection of animal objects from an external file. Output on screen the content of a collection of animal objects. Use Iterator to achieve these goals.
|
Explain why spiritual assessment is important
: Explain why spiritual assessment is important in terms of the "five Rs": Reason, Reflection, Religion, Relationships, and Restoration. In your opinion, which is the most important and why? As a health care practitioner, how would you support th..
|
What is the secondary peak current
: Assume an input of 120 V RMS, 60 Hz to a 20:1 stepdown transformer. Also assume a load resistor of 200 Ohms. What is the primary or input peak voltage? What is the secondary peak voltage? What is the secondary peak current?
|
Leasing and buying to cost the same
: How many kilometers must a car be driven per year for leasing and buying to cost the same? Use 10% interest and year-end cost. Leasing: $0.15 per kilometer Buying: $5000 purchase cost, 3-year life, salvage $1200, $0.04 per kilometer for gas and oil, ..
|
Write a program containing a for loop
: SCSC011 PRACTICALS: C++ PROGRAMMING ASSIGNMENT. Write a program containing a for loop (going from 1 to 50) where the answer (1, 2 or 3) of each respondent to each question is read in. (You will need five variables of type int for this). The program..
|
Determine the time required to complete a filling
: Truck has a compaction ratio of 1:2. Pickup time is 1.58 min per service. Truck spends 20 min at the disposal site. It takes 35 min to drive to the disposal site. Assume a density of 250 lbs/cubic yard for uncompacted refuse and 500 lbs/cubic yard..
|
Introductory statement of the company
: Write an introductory statement of the company including but not limited to the type of the company, the location, the industry in which it competes, and the organizational vision and mission that encompasses the nature of the company.
|
Discuss advantages of leasing capital equipment
: Discuss advantages of leasing capital equipment
|
Explain how the ratios are calculated
: Write a 750- to 1,050-word paper in which you summarize the financial performance of the organization. Explain how the ratios are calculated and how the results impact the organization. In addition, explain how the organization is performing compa..
|