#include <stdio.h>int main(){int a[5][5];float avg=0;int sum=0;for(int i=0;i<5;++i){for(int j=0;j<5;++j){if(i==0||j==0||i==4||j==4||i==j||4-i==j){a[i][j]=0;}else{a[i][j]=5*i+j+1;sum+=a[i][j];avg++;}}}printf("输出方阵为:\n");for(int i=0;i<5;++i){for(int j=0;j<4;++j )if(a[i][j])printf("%2d",a[i][j]);else printf(" *");printf(" *\n");}printf("平均值为:%.2f\n",sum/avg);return 0;}