Problem 1 Restaurant Critic I am a restaurant critic and I would like to digital
ID: 3574138 • Letter: P
Question
Problem 1 Restaurant Critic I am a restaurant critic and I would like to digitally archive my database ofreviewed restaurants. Each restaurant review contains the restaurant name, type of food, average meal price and the rating l gave them (0-4 spoons). Create a program that will read in a list of restaurants Ihave reviewed (file must be created first)and allow methe following options: e Search for, and display, a restaurant entered e Display the list of restaurants ordered by name or rating The file itself will start with the number of reviews in total, followed by each review. Each review will be listed in the following order, and on different lines The restaurant name. The type of restaurant. Average meal price (number only) The rating (number only) The number of reviews in review.tut is stored atthe top of the file, you should read this value and dynamically allocate the memoryneeded to store all the reviews in an array of structures (use malloc orcalloc). In your algorithm design create a structure, which can store the restaurant information. Sample Restaurant output: Chili's Food: American Avg. Meal: SI095 Rating: 3 SpoonsExplanation / Answer
#include #include #include #include #include #include #include #include struct menurec{ char number[30]; char name[30]; float price; int customer; }menu; struct orderbill{ char bid[30]; char bnumber[30]; char bname[30]; float bprice; float btotal;} ord[30]; void printxy(int x,int y,char string[]) {gotoxy(x,y); printf("%s",string);} void center(int y,char string[]) {int x=(80-strlen(string)+1)/2; gotoxy(x,y);printf("%s",string);} void twolinebox(int x1,int y1,int x2,int y2) {int x,y; gotoxy(x1,y1); printf("É"); //alt-201 gotoxy(x2,y1); printf("»"); //alt-187 for(y=y1+1;y Today Deal $50
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.