hi im your typical noob to C programming and am asking for some help on a recent program im working on for my intro to C class.
in my program i have to enter payroll information for employees and my professor wants us to use a 2-dimensional array to count for the number of employees and the amount of letters in their name.
so right now if i have this:
how would i use the char emp_name[30][10] to count for the number of employees, and then later use that to prompt for that users name?Code:char emp_name[30][10]; /* Welcome and prompt for number of employees */ printf ("Enter the number of employees (1-10): "); scanf ("%i", &emp_name[30][10]); printf ("\n");
thank you for any help



LinkBack URL
About LinkBacks



