We will take multiple inputs from the user on employee details like id, name, lastName, salary and designation and store it into a list.
Then, we will search for a specific record from the list using its ID, surName or Designation.
Algorithm:
- Step 1: Get input from the user on ID, name, lastName, salary and grade. And then store it in a list.
- Step 2: Get user input for ID to be searched, if it matches the data in the list, print the data otherwise print "employee does not exist".
- Step 3: Get user input for surName to be searched, if it matches the data in the list, print the data otherwise print "employee does not exist".
- Step 4: Get user input for Designation to be searched, if it matches the data in the list, print the data otherwise print "employee does not exist".
Program to get and search details
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer