dsal11
dsal11
DIV : B
ROLL NO.: 20
-----------------------------------------------------------------------------------------
PRACTICAL NO. : 11
#include <bits/stdc++.h>
#define max 20
using namespace std;
struct employee {
string name;
long int code;
string designation;
int sal;
};
int num;
void showMenu();
void build()
{
cout << "Maximum Entries can be "<< max << "\n";
}
showMenu();
}
void insert()
{
if (num < max) {
int i = num;
num++;
}
else {
cout << "Employee Size Full\n";
}
showMenu();
}
}
return;
}
void searchRecord()
{
cout << "Enter the Employee ID to Search Record: ";
int code;
cin >> code;
break;
}
}
showMenu();
}
void showMenu()
{
cout << "------------------------- Employee Management System -----------------------
--\n\n";
cout << "Available Options:\n\n";
cout << "Insert New Entry (1)\n";
cout << "Delete Entry (2)\n";
cout << "Search a Record (3)\n";
cout << "Exit (4)\n";
int option;
cin >> option;
if (option == 1) {
insert();
}
else if (option == 2) {
deleteRecord();
}
else if (option == 3) {
searchRecord();
}
else if (option == 4) {
return;
}
else {
cout << "Expected Options are 1 to 4";
showMenu();
}
}
int main()
{
showMenu();
return 0;
}
Output: