Generation

generate functionFri, 31 Mar 2023

انشاء برنامج باستخدام السجلات لادخال ببانات 10 موظفين مع ارقامهم ورواتبهم مع امكانية اختيار المستخدم ويظهر للمستخدم رسائل توضحية للاختيار دالة ادخال البيانات للموظفين دالة طباعة بيانات الموظفين دالة للبحث عن موظف داخل السجل دالة لترتيب الموظفين حسب اكبر راتب

#include <iostream> using namespace std; const int MAX = 10; struct Employee{ int id; double salary; }; void displayEmployees(Employee employees[], int size); void addEmployee(Employee employees[]); void sortEmployees(Employee employees[], int size); int main() { Employee employees[MAX]; int userChoice = 0; while (userChoice != 5) { cout << "1- Add New Employee" << endl; cout << "2- Display Employees" << endl; cout << "3- Sort Employees" << endl; cout << "4- Search Employee" << endl; cout << "5- Exit " << endl; cout << "Enter your choice: "; cin >> userChoice; if (userChoice == 1) { addEmployee(employees); } else if (userChoice == 2) { displayEmployees(employees, MAX); } else if (userChoice == 3) { sortEmployees(employees

Want to kickstart your project?Use the new AI Studio to create your code