//menu.cpp
#include<iostream>
using namespace std;
int main() {
int i, sum, counter, j;
bool flag;
int choice;
do
{
cout << endl
<< "Choose 1 to search by Title.\n"
<< "Choose 2 to search by Author.\n"
<< "Choose 3 to search by ISBN.\n"
<< "Choose 4 to exit this program.\n"
<< "Enter your choice and press return: ";
cin >> choice;
switch (choice)
{
case 1:
// code for search by title
cout << "Search by Title.\n";
break;
case 2:
// code for search by author
cout << "Search by Author.\n";
break;
case 3:
// code for search by ISBN
cout << "Search by ISBN.\n";
break;
case 4:
// code for exit
cout << "End of program.\n";
break;
default:
// code for search by author
cout << "Invalid choice, please try again.\n";
}
}while(choice != 4);
return 0;
}