int main(void) { char shijie[HS][LS]; du_cssj(shijie,sizeof(shijie)/sizeof(shijie[0])); do { xs_shijie(shijie,sizeof(shijie)/sizeof(shijie[0])); js_weilai(shijie,sizeof(shijie)/sizeof(shijie[0])); } while(sf_jx()); system(“pause”); return 0; } int js_ljsm(const int gzh,const int gzl,char sj[][LS],const int sjhs) { int sm=0; int h,l; for(h=gzh-1;h<=gzh+1;h++) { for(l=gzl-1;l<=gzl+1;l++) { if(h<0||h>=sjhs) continue; if(l<0||l>sizeof(sj[0])/sizeof(sj[0][0])) continue; if(sj[h][l]==XB) sm++; } } return sm; } void cb_shijie(char from[][LS],char to[][LS],const int hs) { int h,l; for(h=0;h<hs;h++) for(l=0;l<sizeof(from[0])/sizeof(from[0][0]);l++) to[h][l]=from[h][l]; return ; } void js_weilai(char sj[][LS],const int hs) { char dpsj[HS][LS]; cb_shijie(sj,dpsj,hs); { int h,l; for(h=0;h<hs;h++) {for(l=0;l<sizeof(sj[0])/sizeof(sj[0][0]);l++) { int ljsm; ljsm=js_ljsm(h,l,dpsj,sizeof(dpsj)/sizeof(dpsj[0])); switch (ljsm) {case HOU1:break; case HOU2:sj[h][l]=XB;break; default:sj[h][l]=KB;break; }...