const char C[71] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 .,-!?()";
char M[70][70];
\340\215\270\216\354\217\340\220\370\221\340\222Ë“\212\225\250\226 Ö˜\245\232\300\233?\235&\236P\237\270\240\242@\243 \256\273\257\243\260\234\261\247\262\200\263\344\264X\266Z\267 x\270P\271Z\272\220\273\375\274\250\276\300
void showSetting() { cout<<"W="<<W<<", H="<<H<<endl; int i,startRow = 0, endRow, startCol = 0; int counter=0; endRow = H-1; while(startRow <= endRow && startCol <= W) { for (i = startCol; i < W; i++) { M[startCol][i] = C[counter]; counter++; } startRow++; for (i = startRow; i < endRow; i++) { M[i][W] = C[counter]; counter++; } W--; if (startRow <= endRow) { for (i = W; i >= startCol; i--) { M[endRow][i] =C[counter]; counter++; } endRow--; } if (startCol <= W) { for (i = endRow; i >= startRow; i--) { M[i][startCol] = C[counter]; counter++; } startCol++; } } for(i = 0; i <70; i++) { for (int j = 0; j <70; j++) { cout<<M[i][j]; } cout<<endl; }
C[counter]
C[counter];
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)