Code:
scanf("%s", staff[i][j]);
Look up fgets().
Why don't you just use a array of doubles (or floats)?
Code:
#include<stdio.h>
int main (void)
{
/*declare variables */
int i, j;
double staff[20][3][50];
/*Allow a user to enter staff's details*/
printf("Please enter the staff's name, pay classification (in $) and hours worked.\n");
for (i = 0; i < 20; i++)
{
for (j = 0; j < 3; j++)
{
scanf("%lf", staff[i][j]);
}/*end (for (j = 0; j < numCols; ++j))*/
putchar('\n');
}/*end (for (i = 0; i < numRows; ++i))*/
printf("\n\n Name: %s, Pay class: %s, Hrs: %s\n", staff[0][0], staff[0][1], staff[0][2]);
return 0;
}
Something like that might work . . . if you fixed the printf() . . . .