Ya, I'm still a newb...it's probly because my teacher has an extremely heavy accent and my book sucks, BUT I still try. Now my problem is trying to make a 5x5 array that adds the rows and columns. like
0 1 2 3 4 5 blah blah, but I need the user to enter the 10 numbers. so far i have
1 2 3 4 5 6
2 3 4 5 6 7
3 4 5 6 7 8
4 5
5
Code:
#include<stdio.h>
int main()
{
int x, y, i;
int A[5][5];
float sum;
printf("enter 5 numbers\n");
for (x = 0; x < 5; x++)
scanf("%d", &A[x]);
printf("enter 5 more\n");
for (y = 0; y < 5; y++)
scanf("%d", &A[y]);
i = -1;
while (i<5)
{
i++;
sum = A[x][y];
}
printf("[%d][%d] = %f\n", x, y, sum);
system("PAUSE");
return 0;
}
i know im not even close, but im lost. I've been reading the forums and reading my book over and over, but I can't find any good examples. Thanks for any help.