/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include<iostream>
using namespace std;
int main(){
char yesNo;
string bookName[50];
string bookAuthor[50];
string bookID[50];
int i = 0, choice;
do{
cout << "==========================" << endl;
cout << "LIBRARY MANAGEMENT SYSTEM" << endl;
cout << "==========================" << endl;
cout << "[1] Add Books" << endl;
cout << "[2] Delete Books" << endl;
cout << "[3] Search Books" << endl;
cout << "[4] View Book List" << endl;
cout << "[5] Close Application" << endl;
cout<<"Enter a number: ";
cin>>choice;
switch(choice){
case 1:
cin.ignore();
cout<<"Enter book name: ";
getline(cin, bookName[i]);
cout<<"Enter book author: ";
getline(cin, bookAuthor[i]);
cout<<"Enter book ID: ";
getline(cin, bookID[i]);
i++;
cout<<"Book succesfully added!"<<endl;
break;
case 4:
cout<<"All Books"<<endl;
for(int x=0; x<=i; x++){
cout<< bookName[x] << endl;
}
}
cout<<"Do you want to continue (Y/N)";
cin>>yesNo;
}while (yesNo == 'y' || yesNo == 'Y');
cout<<"Thank You!";
return 0;
}