#include #include #include main() { int s[41][41]; int i,j,ix,jx,nx,ns,nstop; long iseed,m,mx,mm; double w,e,p,pl; FILE *fp; if ((fp=fopen("moment.data","w+"))==NULL) { fprintf(stderr,"cannot open moment.data\n"); exit(-2); } scanf("%d %d %d %f %d",&ix,&jx,&nstop,&w,&iseed); srand48(iseed); mx = (ix-1)*(jx-1); for (i=0; i<=ix; i++) { for (j=0; j<=jx; j++) { s[i][j]=1; } } for (ns=0; ns < nstop; ns++) { for (m=0; m