I have a two-dimensional arrangement with the rand function in which it adds the total of rows but I do not know how to do it so that it also sums the total of columns
in row 16 is where I want to add the total of each column
include stdio.h >
include conio.h >
include stdlib.h >
include time.h >
int arr [16] [13], x, y, acu;
main ()
{
printf ("\ n"); printf ("vendor Vento Jetta Polo Teramont Beetle Golf Gol Passat Up! Tiguan Touareg TOTAL"); printf ("\ n");
srand(time(NULL));
for(x=0;x<15;x++)
for(y=1;y<12;y++)
arr[x][y]=1+rand()%9;
for(x=0;x<15;x++){
acu=0;
for(y=1;y<13;y++)
acu=acu+arr[x][y];
arr[x][12]=acu;
}
//
//
for(x=0;x<15;x++){
printf("\n");
for(y=1;y<13;y++)
printf("\t%d", arr[x][y]);
} getch (); return 0; }