We need to write a C Programming Code for the below constraints.
An IT organization decides to collect details of an employee and process the details to decide on whether the employee :
• Employee has any meritorious achievement
• Is he eligible for promotion
• Does he need additional technical training support for performing tasks assigned
The following details need to be collected, namely his name, contact details, skills and qualification, service, awards, etc
• The employee would be often incentives if he has received awards for any IT skill and has completed 6 years service
• The employee would be offered promotion if he has contributed to improve business by way of designing new software and patented the same
The complete C Program with output is given below. For qualification, we have assumed that if the person is graduated then no additional technical training is required, else additional training will be required.
C Code :
#include <stdio.h>
int main()
{
char name[30],contact_no[12],skills[50],graduate;
int awards,services;
printf("Enter Employee Name : ");
fgets(name, 30, stdin);
printf("Enter Contact Number : ");
fgets(contact_no, 20, stdin);
printf("Enter Skills separated by comma(,) : ");
fgets(skills, 50, stdin);
printf("Have you done graduation? (y/n) : ");
scanf("%c",&graduate);
printf("Have you ever contributed to improve business by way of
designing new software and patented the same? (0 for no / 1 for
yes) : ");
scanf("%d",&services);
printf("Enter number of awards you got : ");
scanf("%d",&awards);
printf("\nEmployee Name : %s\n",name);
printf("Employee Contact Number : %s\n",contact_no);
printf("Employee Skills : %s\n",skills);
if(graduate=='y')
{
printf("No additional traning is required to the
employee.\n");
}
else
printf("The employee needs additional technical training support
for performing tasks assigned.\n");
if(awards!=0)
{
printf("The Employee is incentive.\n");
}
else
printf("The Employee is not incentive.\n");
if(services=='1')
{
printf("The employee should be given the promotion.\n");
}
else
printf("The employee should not be given the promotion.\n");
return 0;
}
Output :
If you have any doubt regarding the solution then let me know in
comment. If it helps, kindly give an upVote to this
answer.
Get Answers For Free
Most questions answered within 1 hours.