#include <stdio.h>
int y=0;
int main() {
int a[5][5];
int f=0;
for(int i=0; i<4; i++)
{
for(int k=0; k<4; k++)
{
scanf("%d", &a[i][k]);
}
}
for(int i=0; i<4; i++)
{
for(int k=0; k<4; k++)
{
f = f + a[i][k];
printf("%d ", a[i][k]);
}
printf("%d", f);
f=0;
printf("\n");
}
for(int i=0; i<4; i++)
{
for(int k=0; k<4; k++)
{
f = f + a[k][i];
}
printf("%d ", f);
y=y+f;
f=0;
}
printf("%d", y);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: