Write a program to which inputs the response for each student and which computes / outputs the required percentages. Assume that 25 students were surveyed. Your prompt should have the following format: Do you walk, drive or live on campus. Use W – if you walk D – if you drive L – if you live on campus Use the following data for the execution of your program: W D D L L W D D L L W W D D W L W L L D W L W L D

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 20PE
icon
Related questions
Question
100%

This program deals with processing the results of a survey which was recently conducted. This survey was intended to determine the percentage of students who walk to
campus, the percentage who drive to campus and the percentage who live in residence on campus.
The results of the survey are recorded as follows:

W
D
D
L
.
.
.

This data is to be interpreted as follows: the first person surveyed said that he walks – hence W is
recorded, the second person said that he drives – hence D, the third person said that he drives –
hence D, and the fourth person said that he lives on campus – hence L.

Write a program to which inputs the response for each student and which computes / outputs the
required percentages. Assume that 25 students were surveyed.

Your prompt should have the following format:

Do you walk, drive or live on campus. Use
W – if you walk
D – if you drive
L – if you live on campus
Use the following data for the execution of your program:

W D D L L W D D L L W W D D W L W L L D W L W L D

Expert Solution
steps

Step by step

Solved in 7 steps with 4 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning