I give the prompt at the end to checkout another customer, they have to pick Y or N. If they pick N it will go to the good bye, sotre closing, ect...but if they pick Y then it just sits there, it does not know to go back up top to customer two....how can I change this?
Bryan
Code:#include <iostream> #include <fstream> #include <cctype> #include <string> //#include "grocery.h" using namespace std; int ProdNum; string ProdName; float ProdPrice; char Taxable; int Quantity; const int tax_rate=.075; int main() { ifstream OpenFile("inventory.txt"); char ch; while(!OpenFile.eof()) { OpenFile.get(ch); cout << ch; } cout << endl << endl; cout << "Thanks for shopping at OUR Market." << endl << endl; { int customer = 1; cout << "Enter product number and Quantity for customer " << customer++ << endl; cout << "Enter product code 0 to end purchases." << endl << endl; do { cin >> ProdNum; Quantity; } while (ProdNum!=0); cout<<"Thanks for shopping, your receipt is printed below" << endl << endl; } { cout << "Do you want to checkout another customer? (Y) or (N)" << endl; char more; do { cin >> more; } while (more != 'N'); cout << "Close the store for the night. Bye." << endl; } return 0; }



LinkBack URL
About LinkBacks


