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.)