First off, you need to learn about loops. They are probably in your lecture notes, but here is a brief recap:
1) Declare a variable to control the loop
int i;
2) Set up a loop:
for (i = 0; i < rows; i++)
This says: "i" starts at zero. Go around the loop all the time while "i" is less than the variable "rows", adding one to "i" each time you have been round the loop.
That means that if rows is (say) 3; it will go round the loop 3 times: when is zero, when i is one, and when i is two.
3) Put some code in the loop body:
{
}
This is the code that will be executed each time it goes round the loop.
Now, you can get a row of information at a time from the user:
printf("How many rows?:\n");
scanf("%d",&rows);
printf("How many columns?\n");
scanf("%d",&columns);
int arrayOfData[100][100];
int x, y, currentValue;
for (y = 0; y < rows; y++)
{
printf("Enter data for row %d:\n", y);
for (x = 0; x < columns; x++)
{
printf(" Enter value of column %d:", x + 1);
scanf("%d", ¤tValue);
arrayOfData[x][y] = currentValue;
}
}
Once you have got the hang of this, you can look at using loops to sum your rows, and so forth.
Disclaimer: This code is untested, uncompiled, and may give errors - I don't have a C compiler to hand...
(And for the purists, yes, they are magic numbers, no there are no range checks: He's just getting started, we can cover that later... He has much bigger things to worry about at the moment!)