Question: ICS-103 Computer Programming in C LAB Test 03 Section 63 Name: ID: Write a C program to categorize the employees based on their salary and
ICS-103 Computer Programming in C LAB Test 03 Section 63 Name: ID: Write a C program to categorize the employees based on their salary and service years. The program will continue displaying the category till the user inserts 0 0 for salary and service years. If the user inserted salary or service years less than 0, then "Invalid be displayed and the program will continue reading another input (salary and service years). In a function called EmployCategory your program will categorize the employ based on his salary and service years that are inserted in the main function. Your program will print the category of the employee in the main function. The categories of employees are shown in the table below Salary Service years Category Less than or equal to 10 years More than 10 years Less than or equal to 10 years More than 10 years Less than 4000 Between 4000 and 10000 Greater than 10000 Notes: Use a sentinel controlled loop to keep reading the salary and service years from the user till he inserts 0 0 The program will not terminate if the user inserts negative years - - values for salary and service - NO printf or scanf in EmployCategory function Sample run: Insert employ salary and service years: 5300.2 The employ category is A Insert employ salary and service years:-2000 Invalid input Insert employ salary and service years: 3200.0 The employ category is D Insert employ salary and service years: 00 12 8 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
