Hi, here's the problem.
I have these arrays:
char name[2][25];
int salary[2][12];
int rowmax[1];
char months[11][9]={"January", "February", "March", "April", "May", "June", "July", "August", "September", "November", "December"}
User inputs name and salary. I need to find the month in which employee x got the maximum salary.
I know I'll need strcmp, but the logic of the problem escapes me. I've set up a variable match and char name2 and messed around a little, but without success.
while(!match){
gets (name2[25]);
if (strcmp(name2, name)==0){
...?
Am I on the right track? Any help is appreciated.
I have these arrays:
char name[2][25];
int salary[2][12];
int rowmax[1];
char months[11][9]={"January", "February", "March", "April", "May", "June", "July", "August", "September", "November", "December"}
User inputs name and salary. I need to find the month in which employee x got the maximum salary.
I know I'll need strcmp, but the logic of the problem escapes me. I've set up a variable match and char name2 and messed around a little, but without success.
while(!match){
gets (name2[25]);
if (strcmp(name2, name)==0){
...?
Am I on the right track? Any help is appreciated.