Posts

Showing posts from February, 2024

Reading name, post and salary of 10 different employees and displaying those records whose salary is greater than 10000 using user defined function c++

Reading name, post and salary of 10 different employees and displaying those records whose salary is greater than 10000 using user defined function c++ #include <iostream> #include <string> struct Employee {     std::string name;     std::string post;     double salary; }; // Function to display records with salary greater than 10000 void displayHighSalaryEmployees(Employee employees[], int size) {     std::cout << "Employees with salary greater than 10000:\n";     for (int i = 0; i < size; ++i) {         if (employees[i].salary > 10000) {             std::cout << "Name: " << employees[i].name << "\n";             std::cout << "Post: " << employees[i].post << "\n";             std::cout << "Salary: " << employees[i].salary << "\n\n";     ...