Case # 4 is bold where I am stuck. I am trying to list the College input Case 1. I have it input but it only shows the last inser. How do I input the first to last from the college function
#include "stdafx.h"#include #include #include #include #include #include #include #include #include #include "ConsoleApplication11.h"using namespace std;string FBTeam;string College;string location;string Price_of_Ticket;int choice;int main(){vector CULIST(5);vector FBTEAM(5);string itemNumber;int num;int tuition = 0;int dorm = 0;int meal = 0;int total_tuition = 0;int average;const int size = 5;double averages[size] = { 0.0 };bool stop = false, itemFound;cout < "--------------------------------------------------------------------------------"=""><>cout < "="" colleges="" in="" texas=""><>cout < "--------------------------------------------------------------------------------"=""><>cout <><>{repeat:;cout < "\n\n1.="" add="" colleges="" and="" city"=""><>cout < "2.="" add="" football="" team="" and="" ticket="" price"=""><>cout < "3.="" calculate="" total="" tution."=""><>cout < "4.="" calculate="" average="" tuition="" of="" the="" schools"=""><>cout < "5.="" search="" and="" display="" information"=""><>cout < "6.=""><>cout < "choose="" one:="" \n"=""><>cin >> choice;switch (choice){case 1:for (vector::size_type num=0; num < 5;="">{cout < "please="" enter="" the="" name="" for="" college="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> College;CULIST.push_back(College);cout < "enter="" city="" of="" college="" #=""><>< ":="">cin >> location;string University;University = College + " - " + location;CULIST.push_back(University);}goto repeat;case 2:for (int num = 0; num < 5;="">{cout < "enter="" the="" name="" for="" football="" team="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> FBTeam;FBTEAM.push_back(FBTeam);cout < "enter="" the="" cost="" of="" tickts="" for="" football="" team="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> Price_of_Ticket;FBTEAM.push_back(Price_of_Ticket);}goto repeat;case 3:cout < "cost="" of="" total="" tution="" for="" the="">for (vector::size_type num = 0; num < 5;="">{cout < "enter="" semester="" tution:="">cin >> tuition;cout < "enter="" the="" cost="" of="" room:="">cin >> dorm;cout < "enter="" the="" cost="" of="" meal:="">cin >> meal;total_tuition = (tuition + dorm + meal);cout < "total="" tution="" for="" college=""><><" is:="" "="">">< total_tuition=""><>FBTEAM.resize(total_tuition);total_tuition += averages[num];averages[num] = total_tuition;}goto repeat;case 4:cout < "the="" tution:="">for (int i = 0; i < college.size();="">cout < ""=""><>cout <>cout <>cout < "calculate="" average="" tuition="" of="" the="" five="" universities:="">average = total_tuition / size;cout < "the="" average="" is="" "="">< average=""><>goto repeat;case 5:cout < "search="" and="" display="">cout < "please="" type="" in="" the="" item="" you="" are="" looking="" for:="">cin >> itemNumber;itemFound = false;for (vector::size_type i = 0; i < culist.size();="">{cout < culist[i]="">< "="">}for (vector::size_type i = 0; i < fbteam.size();="">{cout < fbteam[i]="">< "="">}goto repeat;case 6:exit(0);default:cout < "invalid="">}}return 0;}Extracted text: styles Eding %3D AutoSave O Off brain... - Reyes, Felice RF b b x b BGGHGEE O0 G + File Home Insert Design Layout References Mailings Review View Help Acrobat O Search i bartleby.com/dashboard/my-questions A I Apps E 10 Tips For Success... B Lottery Number Ge.. Bb Blackboard Learn E Reading list >> Paste Font Paragraph Create and Share Request Sensitivity Editor = bartleb ert Adobe PDF Signatures Ask a Question Clipboard a Adobe Acrobat Sensitivity Editor Create a C++ menu program that uses two vectors to allow a user to maintain a list of business and their teams 25 out of 30 questions left this cycle Hi Felic Renews on Jul 28, 2021 Ask our subject matter experts your homework question and you'll be notified The program must have the following: when it's answered. Use a vector called vector1 for the college/university and a vector called Vector1 My Solutions Answers from an expert in as fast as 30 minutes!* for the football team Organize the main program to call four functions. The first function must allow a user to Add five businesses and their city Question Asking Tips - Ask one academic question at a time - Keep questions specific and include all details - Contact Support for textbook, writing, or account help where the institution is located into the vector1 vector A second function call the vector1 vector that must contain Filter = My a. The name of the team. b. A price of a ticket to attend. c. The calculation of the business to use. The business should be based on appetizer, meal, and dessert. Subject Computer Science The third function should allow a user to search and display the information such as the business, location, total, team and ticket price when searching for the business in the vectors. Rejected abe 2,107/5,000 Tam trying and city) cost and n В 'ט x? X2 Ix The fourth function must compute the average of the all the businesses and display the result. you can guide me how to do that. the averas My main concern is to ask certain questions when the user Example: Restaurant 1 was $100 make a choice and the best function to implement into this Restaurant 2 was $150 Engineerir situation and how to combine a an if statement to ask the question five times and add them to the vectors. Also, search and display the vectors is what I need help with. Again, Please don't reject. Restaurant 3 was 60 Restaurant 4 was 120 Answered 1 Restaurant 5 was 200 Tam tryin and city) a cost and n Then, the average cost to eat at a restaurant in this area is : $ 0/2 Images Please select images of type PNG, JPG, GIF, or BMP X the avera Page 1 of 1 202 words D. Focus 100% 4:28 PM P 7/10/2021 !! !!
using namespace std;
string FBTeam;string College;string location;string Price_of_Ticket;int choice;
int main(){vector CULIST(5);vector FBTEAM(5);string itemNumber;int num;int tuition = 0;int dorm = 0;int meal = 0;int total_tuition = 0;int average;const int size = 5;double averages[size] = { 0.0 };bool stop = false, itemFound;cout < "--------------------------------------------------------------------------------"=""><>cout < "="" colleges="" in="" texas=""><>cout < "--------------------------------------------------------------------------------"=""><>cout <><>{repeat:;cout < "\n\n1.="" add="" colleges="" and="" city"=""><>cout < "2.="" add="" football="" team="" and="" ticket="" price"=""><>cout < "3.="" calculate="" total="" tution."=""><>cout < "4.="" calculate="" average="" tuition="" of="" the="" schools"=""><>cout < "5.="" search="" and="" display="" information"=""><>cout < "6.=""><>cout < "choose="" one:="" \n"=""><>cin >> choice;switch (choice){case 1:for (vector::size_type num=0; num < 5;="">{cout < "please="" enter="" the="" name="" for="" college="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> College;CULIST.push_back(College);cout < "enter="" city="" of="" college="" #=""><>< ":="">cin >> location;string University;University = College + " - " + location;CULIST.push_back(University);}goto repeat;case 2:for (int num = 0; num < 5;="">{cout < "enter="" the="" name="" for="" football="" team="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> FBTeam;FBTEAM.push_back(FBTeam);cout < "enter="" the="" cost="" of="" tickts="" for="" football="" team="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> Price_of_Ticket;FBTEAM.push_back(Price_of_Ticket);}goto repeat;case 3:cout < "cost="" of="" total="" tution="" for="" the="">for (vector::size_type num = 0; num < 5;="">{cout < "enter="" semester="" tution:="">cin >> tuition;cout < "enter="" the="" cost="" of="" room:="">cin >> dorm;cout < "enter="" the="" cost="" of="" meal:="">cin >> meal;total_tuition = (tuition + dorm + meal);cout < "total="" tution="" for="" college=""><><" is:="" "="">">< total_tuition=""><>FBTEAM.resize(total_tuition);total_tuition += averages[num];averages[num] = total_tuition;}goto repeat;case 4:cout < "the="" tution:="">for (int i = 0; i < college.size();="">cout < ""=""><>cout <>cout <>cout < "calculate="" average="" tuition="" of="" the="" five="" universities:="">average = total_tuition / size;cout < "the="" average="" is="" "="">< average=""><>goto repeat;case 5:cout < "search="" and="" display="">cout < "please="" type="" in="" the="" item="" you="" are="" looking="" for:="">cin >> itemNumber;itemFound = false;for (vector::size_type i = 0; i < culist.size();="">{cout < culist[i]="">< "="">}for (vector::size_type i = 0; i < fbteam.size();="">{cout < fbteam[i]="">< "="">}goto repeat;case 6:exit(0);default:cout < "invalid="">}}return 0;}Extracted text: styles Eding %3D AutoSave O Off brain... - Reyes, Felice RF b b x b BGGHGEE O0 G + File Home Insert Design Layout References Mailings Review View Help Acrobat O Search i bartleby.com/dashboard/my-questions A I Apps E 10 Tips For Success... B Lottery Number Ge.. Bb Blackboard Learn E Reading list >> Paste Font Paragraph Create and Share Request Sensitivity Editor = bartleb ert Adobe PDF Signatures Ask a Question Clipboard a Adobe Acrobat Sensitivity Editor Create a C++ menu program that uses two vectors to allow a user to maintain a list of business and their teams 25 out of 30 questions left this cycle Hi Felic Renews on Jul 28, 2021 Ask our subject matter experts your homework question and you'll be notified The program must have the following: when it's answered. Use a vector called vector1 for the college/university and a vector called Vector1 My Solutions Answers from an expert in as fast as 30 minutes!* for the football team Organize the main program to call four functions. The first function must allow a user to Add five businesses and their city Question Asking Tips - Ask one academic question at a time - Keep questions specific and include all details - Contact Support for textbook, writing, or account help where the institution is located into the vector1 vector A second function call the vector1 vector that must contain Filter = My a. The name of the team. b. A price of a ticket to attend. c. The calculation of the business to use. The business should be based on appetizer, meal, and dessert. Subject Computer Science The third function should allow a user to search and display the information such as the business, location, total, team and ticket price when searching for the business in the vectors. Rejected abe 2,107/5,000 Tam trying and city) cost and n В 'ט x? X2 Ix The fourth function must compute the average of the all the businesses and display the result. you can guide me how to do that. the averas My main concern is to ask certain questions when the user Example: Restaurant 1 was $100 make a choice and the best function to implement into this Restaurant 2 was $150 Engineerir situation and how to combine a an if statement to ask the question five times and add them to the vectors. Also, search and display the vectors is what I need help with. Again, Please don't reject. Restaurant 3 was 60 Restaurant 4 was 120 Answered 1 Restaurant 5 was 200 Tam tryin and city) a cost and n Then, the average cost to eat at a restaurant in this area is : $ 0/2 Images Please select images of type PNG, JPG, GIF, or BMP X the avera Page 1 of 1 202 words D. Focus 100% 4:28 PM P 7/10/2021 !! !!
int num;int tuition = 0;int dorm = 0;int meal = 0;int total_tuition = 0;int average;const int size = 5;double averages[size] = { 0.0 };bool stop = false, itemFound;
cout < "--------------------------------------------------------------------------------"=""><>cout < "="" colleges="" in="" texas=""><>cout < "--------------------------------------------------------------------------------"=""><>cout <><>{repeat:;cout < "\n\n1.="" add="" colleges="" and="" city"=""><>cout < "2.="" add="" football="" team="" and="" ticket="" price"=""><>cout < "3.="" calculate="" total="" tution."=""><>cout < "4.="" calculate="" average="" tuition="" of="" the="" schools"=""><>cout < "5.="" search="" and="" display="" information"=""><>cout < "6.=""><>cout < "choose="" one:="" \n"=""><>cin >> choice;switch (choice){case 1:for (vector::size_type num=0; num < 5;="">{cout < "please="" enter="" the="" name="" for="" college="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> College;CULIST.push_back(College);cout < "enter="" city="" of="" college="" #=""><>< ":="">cin >> location;string University;University = College + " - " + location;CULIST.push_back(University);}goto repeat;case 2:for (int num = 0; num < 5;="">{cout < "enter="" the="" name="" for="" football="" team="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> FBTeam;FBTEAM.push_back(FBTeam);cout < "enter="" the="" cost="" of="" tickts="" for="" football="" team="" #="" "="">< (num="" +="" 1)="">< ":="">cin >> Price_of_Ticket;FBTEAM.push_back(Price_of_Ticket);}goto repeat;case 3:cout < "cost="" of="" total="" tution="" for="" the="">for (vector::size_type num = 0; num < 5;="">{cout < "enter="" semester="" tution:="">cin >> tuition;cout < "enter="" the="" cost="" of="" room:="">cin >> dorm;cout < "enter="" the="" cost="" of="" meal:="">cin >> meal;total_tuition = (tuition + dorm + meal);cout < "total="" tution="" for="" college=""><><" is:="" "="">">< total_tuition=""><>FBTEAM.resize(total_tuition);total_tuition += averages[num];averages[num] = total_tuition;}goto repeat;case 4:cout < "the="" tution:="">for (int i = 0; i < college.size();="">cout < ""=""><>cout <>cout <>cout < "calculate="" average="" tuition="" of="" the="" five="" universities:="">average = total_tuition / size;cout < "the="" average="" is="" "="">< average=""><>goto repeat;case 5:cout < "search="" and="" display="">cout < "please="" type="" in="" the="" item="" you="" are="" looking="" for:="">cin >> itemNumber;itemFound = false;for (vector::size_type i = 0; i < culist.size();="">{cout < culist[i]="">< "="">}for (vector::size_type i = 0; i < fbteam.size();="">{cout < fbteam[i]="">< "="">}goto repeat;case 6:exit(0);default:cout < "invalid="">}}return 0;}Extracted text: styles Eding %3D AutoSave O Off brain... - Reyes, Felice RF b b x b BGGHGEE O0 G + File Home Insert Design Layout References Mailings Review View Help Acrobat O Search i bartleby.com/dashboard/my-questions A I Apps E 10 Tips For Success... B Lottery Number Ge.. Bb Blackboard Learn E Reading list >> Paste Font Paragraph Create and Share Request Sensitivity Editor = bartleb ert Adobe PDF Signatures Ask a Question Clipboard a Adobe Acrobat Sensitivity Editor Create a C++ menu program that uses two vectors to allow a user to maintain a list of business and their teams 25 out of 30 questions left this cycle Hi Felic Renews on Jul 28, 2021 Ask our subject matter experts your homework question and you'll be notified The program must have the following: when it's answered. Use a vector called vector1 for the college/university and a vector called Vector1 My Solutions Answers from an expert in as fast as 30 minutes!* for the football team Organize the main program to call four functions. The first function must allow a user to Add five businesses and their city Question Asking Tips - Ask one academic question at a time - Keep questions specific and include all details - Contact Support for textbook, writing, or account help where the institution is located into the vector1 vector A second function call the vector1 vector that must contain Filter = My a. The name of the team. b. A price of a ticket to attend. c. The calculation of the business to use. The business should be based on appetizer, meal, and dessert. Subject Computer Science The third function should allow a user to search and display the information such as the business, location, total, team and ticket price when searching for the business in the vectors. Rejected abe 2,107/5,000 Tam trying and city) cost and n В 'ט x? X2 Ix The fourth function must compute the average of the all the businesses and display the result. you can guide me how to do that. the averas My main concern is to ask certain questions when the user Example: Restaurant 1 was $100 make a choice and the best function to implement into this Restaurant 2 was $150 Engineerir situation and how to combine a an if statement to ask the question five times and add them to the vectors. Also, search and display the vectors is what I need help with. Again, Please don't reject. Restaurant 3 was 60 Restaurant 4 was 120 Answered 1 Restaurant 5 was 200 Tam tryin and city) a cost and n Then, the average cost to eat at a restaurant in this area is : $ 0/2 Images Please select images of type PNG, JPG, GIF, or BMP X the avera Page 1 of 1 202 words D. Focus 100% 4:28 PM P 7/10/2021 !! !!
case 3:cout < "cost="" of="" total="" tution="" for="" the="">for (vector::size_type num = 0; num < 5;="">{cout < "enter="" semester="" tution:="">cin >> tuition;cout < "enter="" the="" cost="" of="" room:="">cin >> dorm;cout < "enter="" the="" cost="" of="" meal:="">cin >> meal;total_tuition = (tuition + dorm + meal);cout < "total="" tution="" for="" college=""><><" is:="" "="">">< total_tuition=""><>FBTEAM.resize(total_tuition);total_tuition += averages[num];averages[num] = total_tuition;}goto repeat;case 4:cout < "the="" tution:="">for (int i = 0; i < college.size();="">cout < ""=""><>cout <>cout <>cout < "calculate="" average="" tuition="" of="" the="" five="" universities:="">average = total_tuition / size;cout < "the="" average="" is="" "="">< average=""><>goto repeat;case 5:cout < "search="" and="" display="">cout < "please="" type="" in="" the="" item="" you="" are="" looking="" for:="">cin >> itemNumber;itemFound = false;for (vector::size_type i = 0; i < culist.size();="">{cout < culist[i]="">< "="">}for (vector::size_type i = 0; i < fbteam.size();="">{cout < fbteam[i]="">< "="">}goto repeat;case 6:exit(0);default:cout < "invalid="">}}return 0;}Extracted text: styles Eding %3D AutoSave O Off brain... - Reyes, Felice RF b b x b BGGHGEE O0 G + File Home Insert Design Layout References Mailings Review View Help Acrobat O Search i bartleby.com/dashboard/my-questions A I Apps E 10 Tips For Success... B Lottery Number Ge.. Bb Blackboard Learn E Reading list >> Paste Font Paragraph Create and Share Request Sensitivity Editor = bartleb ert Adobe PDF Signatures Ask a Question Clipboard a Adobe Acrobat Sensitivity Editor Create a C++ menu program that uses two vectors to allow a user to maintain a list of business and their teams 25 out of 30 questions left this cycle Hi Felic Renews on Jul 28, 2021 Ask our subject matter experts your homework question and you'll be notified The program must have the following: when it's answered. Use a vector called vector1 for the college/university and a vector called Vector1 My Solutions Answers from an expert in as fast as 30 minutes!* for the football team Organize the main program to call four functions. The first function must allow a user to Add five businesses and their city Question Asking Tips - Ask one academic question at a time - Keep questions specific and include all details - Contact Support for textbook, writing, or account help where the institution is located into the vector1 vector A second function call the vector1 vector that must contain Filter = My a. The name of the team. b. A price of a ticket to attend. c. The calculation of the business to use. The business should be based on appetizer, meal, and dessert. Subject Computer Science The third function should allow a user to search and display the information such as the business, location, total, team and ticket price when searching for the business in the vectors. Rejected abe 2,107/5,000 Tam trying and city) cost and n В 'ט x? X2 Ix The fourth function must compute the average of the all the businesses and display the result. you can guide me how to do that. the averas My main concern is to ask certain questions when the user Example: Restaurant 1 was $100 make a choice and the best function to implement into this Restaurant 2 was $150 Engineerir situation and how to combine a an if statement to ask the question five times and add them to the vectors. Also, search and display the vectors is what I need help with. Again, Please don't reject. Restaurant 3 was 60 Restaurant 4 was 120 Answered 1 Restaurant 5 was 200 Tam tryin and city) a cost and n Then, the average cost to eat at a restaurant in this area is : $ 0/2 Images Please select images of type PNG, JPG, GIF, or BMP X the avera Page 1 of 1 202 words D. Focus 100% 4:28 PM P 7/10/2021 !! !!
case 4:cout < "the="" tution:="">
for (int i = 0; i < college.size();="">cout < ""=""><>cout <>cout <>cout < "calculate="" average="" tuition="" of="" the="" five="" universities:="">average = total_tuition / size;cout < "the="" average="" is="" "="">< average=""><>goto repeat;
case 5:cout < "search="" and="" display="">cout < "please="" type="" in="" the="" item="" you="" are="" looking="" for:="">cin >> itemNumber;itemFound = false;for (vector::size_type i = 0; i < culist.size();="">{cout < culist[i]="">< "="">}for (vector::size_type i = 0; i < fbteam.size();="">{cout < fbteam[i]="">< "="">}goto repeat;case 6:exit(0);default:cout < "invalid="">}}return 0;}Extracted text: styles Eding %3D AutoSave O Off brain... - Reyes, Felice RF b b x b BGGHGEE O0 G + File Home Insert Design Layout References Mailings Review View Help Acrobat O Search i bartleby.com/dashboard/my-questions A I Apps E 10 Tips For Success... B Lottery Number Ge.. Bb Blackboard Learn E Reading list >> Paste Font Paragraph Create and Share Request Sensitivity Editor = bartleb ert Adobe PDF Signatures Ask a Question Clipboard a Adobe Acrobat Sensitivity Editor Create a C++ menu program that uses two vectors to allow a user to maintain a list of business and their teams 25 out of 30 questions left this cycle Hi Felic Renews on Jul 28, 2021 Ask our subject matter experts your homework question and you'll be notified The program must have the following: when it's answered. Use a vector called vector1 for the college/university and a vector called Vector1 My Solutions Answers from an expert in as fast as 30 minutes!* for the football team Organize the main program to call four functions. The first function must allow a user to Add five businesses and their city Question Asking Tips - Ask one academic question at a time - Keep questions specific and include all details - Contact Support for textbook, writing, or account help where the institution is located into the vector1 vector A second function call the vector1 vector that must contain Filter = My a. The name of the team. b. A price of a ticket to attend. c. The calculation of the business to use. The business should be based on appetizer, meal, and dessert. Subject Computer Science The third function should allow a user to search and display the information such as the business, location, total, team and ticket price when searching for the business in the vectors. Rejected abe 2,107/5,000 Tam trying and city) cost and n В 'ט x? X2 Ix The fourth function must compute the average of the all the businesses and display the result. you can guide me how to do that. the averas My main concern is to ask certain questions when the user Example: Restaurant 1 was $100 make a choice and the best function to implement into this Restaurant 2 was $150 Engineerir situation and how to combine a an if statement to ask the question five times and add them to the vectors. Also, search and display the vectors is what I need help with. Again, Please don't reject. Restaurant 3 was 60 Restaurant 4 was 120 Answered 1 Restaurant 5 was 200 Tam tryin and city) a cost and n Then, the average cost to eat at a restaurant in this area is : $ 0/2 Images Please select images of type PNG, JPG, GIF, or BMP X the avera Page 1 of 1 202 words D. Focus 100% 4:28 PM P 7/10/2021 !! !!
goto repeat;case 6:exit(0);
default:cout < "invalid="">}}return 0;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here