#include<stdio.h>
int main()
{
int a[4][5]={{1,3,5,7,9},{2,9,9,9,4},{6,9,9,9,8},{1,3,5,7,0}},i,j,sum=0;
for(i=0;i<4;printf("\n"),++i)
for(j=0;j<5;++j)
if(i==0||i==3||j==0||j==4)
{sum+=a[i][j];
printf("%d",a[i][j]);}
else
putchar(' ');
printf("sum=%d",sum);
return 0;
}