I have a data file which includes an employee name, hours worked, salary and age.
I have to manipulate this data:
Print out the data as it is read in.
Compute overtime(over 40 hours)
Compute tax paid per employee using a specific formula.
Sort the list by name.
And a few others.
I figure the best way to do this is using a structure:
struct person
{
char name[20];
int hours;
int age;
double pay;
};
Is this the most effective way to approach this?
Also I really am not sure how to fill the structure with the data from the file.
Data File:
Duck, Donald 45 3.50 60
Mouse, Mickey 35 6.50 55
Brown, Charlie 35 3.00 20
Oyle, Olive 40 4.50 60
Man, He 45 7.50 20
Ra, She 40 3.50 20
Jetson, George 45 3.50 55
Starr, Brenda 35 8.40 60
Woman, Wonder 40 3.50 55
Jets, Green 45 13.50 55
Barr, Jimmy 35 9.00 60
Evans, Robert 40 8.00 55
Thank you for your help in advance.