A cafeteria wants to determine how students rate each food item. The cafeteria requires an application that surveys the student's opinion of various food items, rating each item as "like" or "dislike". The application should use a two_dimensional array to hold counters for each category in the survey. The application will prompt the user to continuously select a food item and rate it, then display the total ratings for each food item. --- The result should display like this..
Select food item:
1-Pizza
2-Hot Dog
3-Fish sticks
4- mystery meat
5--exit this application
? 1
Do you like or dislike pizza? %26lt;enter 1 or d%26gt;? L
Invalid input
Select food item:
1-Pizza 2-Hot Dog 3-Fish sticks 4- mystery meat 5--exit this application
? 1
the result should say
your results are:
food like dislike
pizza 2 0
hot dog 0 1
fish sticks 1 1
mystery meat 0 1
C++ program help.. i need to write a food survey application:?
Please contact a freelancer from websites like
http://getafreelnacer.com/
Reply:Not sure about your formatting there, plus why use a two dimensional array when a regular array would do just fine?
The main idea for the program is to create a while loop that exits if the user enters 5. Inside the loop you'd do your calculations (increment values) then print the menu again.
false teeth
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment