Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that uses three linked lists ti hold the employee ID\'s. hours w

ID: 3770389 • Letter: W

Question

Write a program that uses three linked lists ti hold the employee ID's. hours worked, and wages. WQhen the program starts, it should ask the user to enter the employee ID's. There should be no limit on the number of ID's the user can enter.

The program should relate the data in eadch linked list through subscripts. The program should display each employee number and ask the user to enter the employees hours and pay rate. It should then calculate the gross wages for that employee and store them in the wages linked list. After the data has been entered for all the employees, the program should display each employees identification number and gross wages.

Explanation / Answer

#include<stdio.h>

#include<conio.h>

#include<string.h>

main()

{

struct Employee

{

int id;

int working hours;

int wages;

}

struct Employee emp[10];

int i,j;

printf("EMPLOYEES RECORD : NN");

for(i=0;i<2;i++)

{

printf(" ");

printf("Enter details of Employee %d ",i+1);

printf("Employee id no: ");

scanf("%d",&emp[i].id);

printf("Working Hours:");

scanf("%s",&emp[i].Working Hours);

printf("Wages:");

pass:

scanf("%d",&emp[i].wages);

if(i>0)

{

for(j=0;j<2;j++)

{

if(emp[j].working hours==emp[i].working hours)

{

printf("this employee id is having working hours and wages like- %d",emp[i].wages);

printf("Employee gross wages are",&gross wage);

scanf("%g",&emp[g].gross wage);

goto pass;

}

}

}

}

getch();

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote