Your physics homework can be a real challenge, and the due date can be really close - feel free to use our assistance and get the desired result.
Be sure that math assignments completed by our experts will be error-free and done according to your instructions specified in the submitted order form.
Our experts will gladly share their knowledge and help you with programming homework. Keep up with the world's newest programming trends.
Get a free quote.
Check the website
for updates.
Receive your completed assignment.
Easy as ABC!
Just provide us with clear instructions and wait for the completed assignment.

Answer on C++ Question for Vineeth Abraham Shaji

Question #4232

Write aprogram in c++ to print hotel bill.The input will be given by the hotel staffs.They will be given option to choose the menu and price will be shown automaticall.The hotel bill will show the item's name,Its quantity and its price along with hotels name and also that days date.
Plz use only the following function as we learned till there..the functions are if else,all loops and also switch statement.the exit function can also be used and all other basic functions can be used...
thx in advance

Expert's answer

// Hotel bill.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include "iostream"
#include "conio.h"

using namespace std;

int count=-1;
struct Dish{
char* name;
int quantity;
double price;
Dish dishes[1000];
void Close(){
int includemenu[1000];
int menuitem=0;
void Menu(){

& cout<<"\nMenu\n\n";
& cout <<"Select the item:\n";
& cout<<"1 - Pesto pizza& & 8.5$\n";
& cout<<"2 - CLASSIC BRUSCHETTA 9.5$\n";
& cout<<"3 - PEPPER KANGARO& 19.5$\n";
& cout<<"4 - THE ROCKS CAESAR& & 15$\n";
& cout<<"5 - SALT WATER CROCODILE& 19.5$\n";
& cout<<"6 - CRISPY BACON& & 16.5$\n";
& cout<<"7 - TANDOORI CHICKEN& 17.5$\n";
& cout<<"8 - Smoked Salami 16.5$\n";
& cout<<"9 - POTATO WEDGES& 8.5$\n";
& cout<<"10 - Exit from menu\n";

& cin>>menuitem;
& count++;

& case 1:
& dishes[1].name ="Pesto pizza";
& dishes[1].price =8.5;
& dishes[1].quantity ++;
& includemenu[count]=1;
& & break;
& case 2:
& dishes[2].name ="CLASSIC BRUSCHETTA";
& dishes[2].price =9.5;
& dishes[2].quantity ++;
& includemenu[count]=2;
& break;
& case 3:
& dishes[3].name ="PEPPER KANGARO";
& dishes[3].price =19.5;
& dishes[3].quantity ++;
& includemenu[count]=3;
& break;
& case 4:
& dishes[4].name ="THE ROCKS CAESAR";
& dishes[4].price =15;
& dishes[4].quantity ++;
& includemenu[count]=4;
& break;
& case 5:
& dishes[5].name ="SALT WATER CROCODILE";
& dishes[5].price =19.5;
& dishes[5].quantity ++;
& includemenu[count]=5;
& break;
& case 6:
& dishes[6].name ="CRISPY BACON";
& dishes[6].price =19.5;
& dishes[6].quantity ++;
& includemenu[count]=6;
& break;
& case 7:
& dishes[7].name ="TANDOORI CHICKEN";
& dishes[7].price =19.5;
& dishes[7].quantity ++;
& includemenu[count]=7;
& break;
& case 8:
& dishes[8].name ="Smoked Salami";
& dishes[8].price =19.5;
& dishes[8].quantity ++;
& includemenu[count]=8;
& break;
& case 9:
& dishes[9].name ="POTATO WEDGES";
& dishes[9].price =19.5;
& dishes[9].quantity ++;
& includemenu[count]=9;
& break;

void showhotelbill(){
char date[9];
cout<<"Item's name Quantity & Price Hotel Name & Date\n";
for(int i=0;i<count;i++ ){
cout<<dishes[includemenu[i]].name<<" quot;<<dishes[includemenu[i]].quantity<<" quot;<<dishes[includemenu[i]].price<<"$ Hotel name & quot;<<" & quot;<<date<<"\n";

int _tmain(int argc, _TCHAR* argv[])
int k=0;
& cout <<"Select a option:\n";
& cout<<"1- Choose the menu\n";
& cout<<"2- Print hotel bill\n";
& cout<<"3- Exit\n";
& cin>>k;
& switch(k){
& case 1:
& Menu();
& & break;
& case 2:
& showhotelbill();
& break;
& case 3:
& Close();
& break;
& }
return 0;


No comments

Leave a comment

Related Questions

Link to us

Share with friends

Get homework help with Assignment Expert:
free questions
Questions and Answers
approved by clients
I was so impressed with your service I had to send the below e-mail twice. My level of satisfaction with the received support was 100%. You all answered my questions and delivered the information I requested in sufficient time. The quality of the completed assignment also receives a 100%+. The expert did an excellent job with the work. One request can you please let me know the name of the expert that completed the work or some form of ID number? I definitely will ask for this expert on my next request for homework assistance. Sorry for the delay in responding to my problem. Since I can't work on this project 24/7 (I also work two jobs besides taking this difficult class and somewhere in between finding time to sleep) I was unable to get back with you yesterday. Please inform the expert programmer who worked on my project that he did a wonderful job and I appreciated the ideal of the addition of using color expressions for the program. I was also amazed that you all were a 24/7 operation. I am very impressed with the service you provide. This was my first visit to your site and it will not be my last. Please send me the link to your site where I need to go to request homework help since I am sure I will need further expertise assistance from your experts. Thank you so very much!!!
Johnhen on October 2013
solving policy
solving policy
Pay us safely via PayPalPayPal
We deliver professional assignment and homework help for students in USA, UK, Canada, Australia, AE and all over the world.
Terms and Conditions | Privacy Policy | Service
© 2014 BrainRouter LTD. All rights reserved.