#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <windows.h>
#include <string.h>
#include <time.h>
int main(void)
{
int arr[5][6] = { 0 };
int num = 1;
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 5; j++)
{
arr[i][j] = num++;
}
}
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 5; j++)
{
arr[4][5] += arr[i][j];
arr[i][5] += arr[i][j];
arr[4][j] += arr[i][j];
}
}
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 6; j++)
{
printf("%5d", arr[i][j]);
}
printf("\n");
}
return 0;
}