Guys sorry to bother you but i really need help regarding my ict proj.. i'm just a freshman and still trying to learn c++.. i saw the one of the dead forums which was posted by a fellow schoolmate but not my batchmate in fact i dont even know him just saw the same proj given by the professor and the same school acronyms...so i found out about this site..since i dont know how to post a thread cause i'm new to the site but hopefully i can get some help.. the poblem is:
ICT02 Programming Project:
Write a C++ program that would display the menu of a restaurant and will accept orders, compute for the total amount and compute for customer change after entering the given cash.
The program should be looping and will end once the user answers No to the question: Another Customer (Y or N).
So i had some codes still confused of the looping cause i have to cls if the answer is no.. and i dont know how to make it repetitive cause im conufsed if i should state another variable if he says yes.. here is my code:
insert
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout<<"SHOW MY HOUSE\n\n";
cout<<"Menu\n\n\n" <<;
cout<<"Meal# Food/Recipe Price | Drink# Lechong Pitchel Price\n\n";
cout<<"1 Lechong kawali 55P | 7 Buko shake 45P\n\n";
cout<<"2 Lechong Kaldero(Lrg Lechon) 75P | 8 Iced Tea 30P\n\n";
cout<<"3 Lechong Sandok (Lechon bits) 50P | 9 Coke 25P\n\n";
cout<<"4 Lechong Mangkok(Lechong adobo) 55P | 10 Sprite 25P\n\n";
cout<<"5 Lechong Batok (Lechon overload) 120P | 11 Sago't gulaman 30P\n\n";
cout<<"6 Lechong Manok 55P | 12 Four Season 30P\n\n";
char answer;
string name;
int norder[12], quantity, order;
double amount, change, cash;
norder[1] = 55;
norder[2] = 75;
norder[3] = 50;
norder[4] = 55;
norder[5] = 120;
norder[6] = 55;
norder[7] = 45;
norder[8] = 30;
norder[9] = 25;
norder[10] = 25;
norder[11] = 30;
norder[12] = 30;
cout<<"Customer Name: ";
cin>>name;
cout<<"Enter the Order: ";
cin>>meal;
cout<<"Quantity: ";
cin>>quantity;
cout<<"Aditional Order (Y/N): ";
cin>>answer;
{
If( answer ==y)
cout<<"Enter the Order: ";
cin>>meal;
cout<<"Quantity: ";
cin>>quantity;
cout<<"Aditional Order (Y/N): ";
cout<<endl;
cin.ignore();
int price = *(norder + (order - 1));
cout<<"Customer name: " <<name <<endl;
cout<<"Total Amount: " <<price * quantity <<endl;
cout<<"Total Cash: " <<endl;
cout<<"Change: " <<endl <<endl;
cin.get();
}
Also credit to Khebabz i think i forgot the name.. i followed some of his format on his reply to what i saw to his post...and i would like to apologize to the one that posted this thread..im just desperate for some help sir..cause im new to the site and dont know how to post a thread